Skip to content
Snippets Groups Projects
Commit d35cd972 authored by Morris Estepa's avatar Morris Estepa
Browse files

Merge branch 'aws-integration' into 'master'

Refactor code to SonarQube standards

See merge request !366
parents cfed3671 75273417
No related branches found
No related tags found
2 merge requests!378No more retry attempts for schema not found,!366Refactor code to SonarQube standards
Pipeline #132010 failed
......@@ -39,7 +39,7 @@ import java.io.IOException;
public class GlobalExceptionMapperCore extends ResponseEntityExceptionHandler {
@Autowired
private JaxRsDpsLog logger;
private JaxRsDpsLog jaxRsDpsLogger;
@ExceptionHandler(AppException.class)
protected ResponseEntity<Object> handleAppException(AppException e) {
......@@ -67,7 +67,7 @@ public class GlobalExceptionMapperCore extends ResponseEntityExceptionHandler {
@ExceptionHandler(IOException.class)
public ResponseEntity<Object> handleIOException(IOException e) {
if (StringUtils.containsIgnoreCase(ExceptionUtils.getRootCauseMessage(e), "Broken pipe")) {
this.logger.warning("Client closed the connection while request still being processed");
this.jaxRsDpsLogger.warning("Client closed the connection while request still being processed");
return null;
} else {
return this.getErrorResponse(
......@@ -96,13 +96,13 @@ public class GlobalExceptionMapperCore extends ResponseEntityExceptionHandler {
if( e.getCause() instanceof Exception) {
Exception original = (Exception) e.getCause();
this.logger.error(original.getMessage(), original);
this.jaxRsDpsLogger.error(original.getMessage(), original);
}
if (e.getError().getCode() > 499) {
this.logger.error(exceptionMsg, e);
this.jaxRsDpsLogger.error(exceptionMsg, e);
} else {
this.logger.warning(exceptionMsg, e);
this.jaxRsDpsLogger.warning(exceptionMsg, e);
}
// Support for non standard HttpStatus Codes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment