cimbalek commented on code in PR #4146:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4146#discussion_r2771066121
##########
addons/common/rest-exception-handler/src/main/java/org/kie/kogito/resource/exceptions/AbstractExceptionsHandler.java:
##########
@@ -96,18 +99,13 @@ protected
AbstractExceptionsHandler(Iterable<ExceptionHandler> errorHandlers) {
}
private T fromErrorCode(ExceptionBodyMessage message) {
- switch (message.getErrorCode()) {
- case "400":
- return badRequest(message);
- case "403":
- return forbidden(message);
- case "404":
- return notFound(message);
- case "409":
- return conflict(message);
- default:
- return internalError(message);
- }
+ return switch (message.getErrorCode()) {
+ case "400" -> badRequest(message);
Review Comment:
This will be related now we change return code to 412
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]