Skip to content

Commit d636094

Browse files
Changed Generic Exception HttpStatus to INTERNAL_SERVER_ERROR
1 parent c222959 commit d636094

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/javadiscord/javabot/api/exception/RestExceptionHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public ResponseEntity<ErrorResponse> handleInternalServerException(@NotNull Inte
5757
*/
5858
@ExceptionHandler(Exception.class)
5959
public ResponseEntity<ErrorResponse> handleGenericException(@NotNull Exception e) {
60-
return buildErrorResponse(HttpStatus.BAD_REQUEST, e.getLocalizedMessage());
60+
return buildErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR, e.getLocalizedMessage());
6161
}
6262

6363
private @NotNull ResponseEntity<ErrorResponse> buildErrorResponse(HttpStatus status, String message, String... errors) {

0 commit comments

Comments
 (0)