| | |
| | | Map<String, Object> resJsonData = new HashMap<String, Object>(); |
| | | resJsonData.put(Constants.RES_KEY_MESSAGE, this.messageAccessor.getResMessage(ex, Constants.RES_KEY_MSG_FAIL)); |
| | | |
| | | return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.OK, request); |
| | | return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.BAD_REQUEST, request); |
| | | } |
| | | |
| | | @ExceptionHandler({ StackOverflowError.class, |
| | |
| | | Map<String, Object> resJsonData = new HashMap<String, Object>(); |
| | | resJsonData.put(Constants.RES_KEY_MESSAGE, this.messageAccessor.getResMessage(MsgConstants.NOT_READABLE_JSON_DATA, Constants.RES_KEY_MSG_FAIL)); |
| | | |
| | | return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.OK, request); |
| | | return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.REQUEST_TIMEOUT, request); |
| | | } |
| | | |
| | | @ExceptionHandler({ Exception.class }) |
| | |
| | | Map<String, Object> resJsonData = new HashMap<String, Object>(); |
| | | resJsonData.put(Constants.RES_KEY_MESSAGE, this.messageAccessor.getResMessage(MsgConstants.NOT_READABLE_JSON_DATA, Constants.RES_KEY_MSG_FAIL)); |
| | | |
| | | return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.OK, request); |
| | | return this.handleExceptionInternal(ex, resJsonData, new HttpHeaders(), HttpStatus.BAD_REQUEST, request); |
| | | } |
| | | |
| | | @Override |
| | |
| | | resJsonData.put(Constants.RES_KEY_MESSAGE, |
| | | this.messageAccessor.getResMessage(MsgConstants.NOT_READABLE_JSON_DATA, Constants.RES_KEY_MSG_FAIL)); |
| | | |
| | | return this.handleExceptionInternal(ex, resJsonData, headers, HttpStatus.OK, request); |
| | | return this.handleExceptionInternal(ex, resJsonData, headers, HttpStatus.BAD_REQUEST, request); |
| | | } |
| | | |
| | | @Override |
| | |
| | | final MethodArgumentNotValidException ex, final HttpHeaders headers, |
| | | final HttpStatus status, final WebRequest request) { |
| | | final String bodyOfResponse = "This should be application specific4"; |
| | | return this.handleExceptionInternal(ex, bodyOfResponse, headers, HttpStatus.OK, request); |
| | | return this.handleExceptionInternal(ex, bodyOfResponse, headers, HttpStatus.BAD_REQUEST, request); |
| | | } |
| | | |
| | | @Override |