|
|
|
@ -40,13 +40,11 @@ public class ErrorParse {
|
|
|
|
|
if(e instanceof ClientError) {
|
|
|
|
|
ClientError ce = (ClientError)e;
|
|
|
|
|
return ApiResponseDTO.error(String.valueOf(ce.getStatus()), ce.getBody(), ce.getStatus());
|
|
|
|
|
//return ApiResponseDTO.error(String.valueOf(ce.getStatus().value()), ce.getBody(), ce.getStatus());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(e instanceof ServerError) {
|
|
|
|
|
ServerError ce = (ServerError) e;
|
|
|
|
|
return ApiResponseDTO.error(String.valueOf(ce.getStatus()), ce.getBody(), ce.getStatus());
|
|
|
|
|
//return ApiResponseDTO.error(String.valueOf(ce.getStatus().value()), ce.getBody(), ce.getStatus());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Async(React) Exception 처리
|
|
|
|
@ -67,6 +65,10 @@ public class ErrorParse {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(e instanceof ReadTimeoutException){
|
|
|
|
|
return getTimeoutException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Async(React) Exception 처리
|
|
|
|
|
if(e.getCause() instanceof WebClientRequestException){
|
|
|
|
|
|
|
|
|
@ -84,6 +86,7 @@ public class ErrorParse {
|
|
|
|
|
return ApiResponseDTO.error(errCode, message, httpStatus);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("rawtypes")
|
|
|
|
|
private static ApiResponseDTO getTimeoutException(){
|
|
|
|
|
return ApiResponseDTO.error(
|
|
|
|
|
String.valueOf(HttpStatus.REQUEST_TIMEOUT.value()),
|
|
|
|
|