Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ public ResponseEntity<?> handleAccountLockedException(Exception ex, WebRequest r
ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false));
return new ResponseEntity<>(errorDetails, HttpStatus.FORBIDDEN);
}

@ExceptionHandler(UnsupportedOperationException.class)
public ResponseEntity<?> handleUnsupportedOperationException(Exception ex, WebRequest request) {
ErrorDetails errorDetails = new ErrorDetails(new Date(), ex.getMessage(), request.getDescription(false));
return new ResponseEntity<>(errorDetails, HttpStatus.FORBIDDEN);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.hackerrank.corebanking.exception;

public class UnsupportedOperationException extends RuntimeException {
public UnsupportedOperationException(String message) {
super(message);
}
}