|
|
@@ -14,12 +14,12 @@ public class GlobalExceptionHandler {
|
|
|
|
|
|
@ExceptionHandler(FeignException.NotFound.class)
|
|
|
public ResponseEntity<Error> handleNotFoundException(FeignException e, WebRequest request) {
|
|
|
- return ResponseEntity.status(HttpStatus.NOT_FOUND).body(new Error(e.getMessage()));
|
|
|
+ return ResponseEntity.status(HttpStatus.NOT_FOUND).body(new Error("Not found"));
|
|
|
}
|
|
|
|
|
|
@ExceptionHandler(FeignException.TooManyRequests.class)
|
|
|
public ResponseEntity<Error> handleTooManyRequestsException(FeignException e, WebRequest request) {
|
|
|
- return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new Error(e.getMessage()));
|
|
|
+ return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(new Error("Too many requests"));
|
|
|
}
|
|
|
|
|
|
}
|