Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump org.springframework.boot:spring-boot-starter-parent from 3.3.5 to 3.4.0 #153

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.5</version>
<version>3.4.0</version>
</parent>


Expand Down
16 changes: 0 additions & 16 deletions src/main/java/ca/gov/dtsstn/passport/api/web/ApiErrorHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.validation.BindException;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.ServletRequestBindingException;
Expand Down Expand Up @@ -51,21 +50,6 @@ public class ApiErrorHandler extends ResponseEntityExceptionHandler {

private static final Logger log = LoggerFactory.getLogger(ApiErrorHandler.class);

@Override
protected ResponseEntity<Object> handleBindException(BindException ex, HttpHeaders headers, HttpStatusCode status, WebRequest request) {
final var body = ImmutableErrorResponseModel.builder()
.operationOutcome(ImmutableOperationOutcomeModel.builder()
.addAllIssues(ex.getFieldErrors().stream().map(this::toIssue).toList())
.operationOutcomeStatus(ImmutableOperationOutcomeStatusModel.builder()
.statusCode("400")
.statusDescriptionText("Bad request") // NOSONAR (repeated string)
.build())
.build())
.build();

return handleExceptionInternal(ex, body, headers, status, request);
}

/**
* A {@link HttpMessageNotReadableException} is thrown the {@link HttpMessageConverter#read(Class, HttpInputMessage)} method fails.
* (ie: when the incoming JSON is malformed)
Expand Down