@@ -44,7 +44,7 @@ static class InternalExceptionAdvice {
44
44
45
45
@ ExceptionHandler (Exception .class )
46
46
@ ResponseStatus (code = HttpStatus .INTERNAL_SERVER_ERROR )
47
- public ErrorResponse onInternalError (Exception exception ) {
47
+ ErrorResponse onInternalError (Exception exception ) {
48
48
log .error ("Unexpected error" , exception );
49
49
return ErrorResponse .create ("INTERNAL_ERROR" , correlationSource .getCorrelation ());
50
50
}
@@ -62,42 +62,42 @@ static class ServiceExceptionAdvice {
62
62
63
63
@ ExceptionHandler (ServiceException .BadRequest .class )
64
64
@ ResponseStatus (code = HttpStatus .BAD_REQUEST )
65
- public ErrorResponse onBadRequest (ServiceException .BadRequest exception ) {
65
+ ErrorResponse onBadRequest (ServiceException .BadRequest exception ) {
66
66
log .error ("Bad request" , exception );
67
67
return ErrorResponse .create (exception .getCode (), correlationSource .getCorrelation ());
68
68
}
69
69
70
70
@ ExceptionHandler (ServiceException .Unauthorized .class )
71
71
@ ResponseStatus (code = HttpStatus .UNAUTHORIZED )
72
- public ErrorResponse onUnauthorized (ServiceException .Unauthorized exception ) {
72
+ ErrorResponse onUnauthorized (ServiceException .Unauthorized exception ) {
73
73
log .error ("Unauthorized" , exception );
74
74
return ErrorResponse .create (exception .getCode (), correlationSource .getCorrelation ());
75
75
}
76
76
77
77
@ ExceptionHandler (ServiceException .Forbidden .class )
78
78
@ ResponseStatus (code = HttpStatus .FORBIDDEN )
79
- public ErrorResponse onForbidden (ServiceException .Forbidden exception ) {
79
+ ErrorResponse onForbidden (ServiceException .Forbidden exception ) {
80
80
log .error ("Forbidden" , exception );
81
81
return ErrorResponse .create (exception .getCode (), correlationSource .getCorrelation ());
82
82
}
83
83
84
84
@ ExceptionHandler (ServiceException .NotFound .class )
85
85
@ ResponseStatus (code = HttpStatus .NOT_FOUND )
86
- public ErrorResponse onNotFound (ServiceException .NotFound exception ) {
86
+ ErrorResponse onNotFound (ServiceException .NotFound exception ) {
87
87
log .error ("Not found" , exception );
88
88
return ErrorResponse .create (exception .getCode (), correlationSource .getCorrelation ());
89
89
}
90
90
91
91
@ ExceptionHandler (ServiceException .InternalError .class )
92
92
@ ResponseStatus (code = HttpStatus .INTERNAL_SERVER_ERROR )
93
- public ErrorResponse onInternalError (ServiceException .InternalError exception ) {
93
+ ErrorResponse onInternalError (ServiceException .InternalError exception ) {
94
94
log .error ("Internal error" , exception );
95
95
return ErrorResponse .create (exception .getCode (), correlationSource .getCorrelation ());
96
96
}
97
97
98
98
@ ExceptionHandler (ServiceException .ServiceUnavailable .class )
99
99
@ ResponseStatus (code = HttpStatus .SERVICE_UNAVAILABLE )
100
- public ErrorResponse onServiceUnavailable (ServiceException .ServiceUnavailable exception ) {
100
+ ErrorResponse onServiceUnavailable (ServiceException .ServiceUnavailable exception ) {
101
101
log .error ("Service unavailable" , exception );
102
102
return ErrorResponse .create (exception .getCode (), correlationSource .getCorrelation ());
103
103
}
@@ -115,21 +115,21 @@ static class ValidateExceptionAdvice {
115
115
116
116
@ ExceptionHandler (JsonProcessingException .class )
117
117
@ ResponseStatus (HttpStatus .BAD_REQUEST )
118
- public ErrorResponse onProcessJson (JsonProcessingException exception ) {
118
+ ErrorResponse onProcessJson (JsonProcessingException exception ) {
119
119
log .error ("JSON processing failed" , exception );
120
120
return ErrorResponse .create ("BAD_CONTENT" , correlationSource .getCorrelation ());
121
121
}
122
122
123
123
@ ExceptionHandler (ValidateRequestException .class )
124
124
@ ResponseStatus (HttpStatus .BAD_REQUEST )
125
- public ErrorResponse onValidateRequest (ValidateRequestException exception ) {
125
+ ErrorResponse onValidateRequest (ValidateRequestException exception ) {
126
126
log .error ("Request validation failed" , exception );
127
127
return ErrorResponse .create ("INVALID_REQUEST" , correlationSource .getCorrelation ());
128
128
}
129
129
130
130
@ ExceptionHandler (ValidateResponseException .class )
131
131
@ ResponseStatus (HttpStatus .INTERNAL_SERVER_ERROR )
132
- public ErrorResponse onValidateResponse (ValidateResponseException exception ) {
132
+ ErrorResponse onValidateResponse (ValidateResponseException exception ) {
133
133
log .error ("Response validation failed" , exception );
134
134
return ErrorResponse .create ("INVALID_RESPONSE" , correlationSource .getCorrelation ());
135
135
}
0 commit comments