added RemoteApiException
This commit is contained in:
@@ -58,4 +58,10 @@ public class GlobalExceptionHandler {
|
||||
return ProblemDetail.forStatusAndDetail(BAD_REQUEST_EMPTY_FIELDS.getStatus(),
|
||||
BAD_REQUEST_EMPTY_FIELDS.getMessage() + " " + e.getMissingFields());
|
||||
}
|
||||
|
||||
@ExceptionHandler(RemoteApiException.class)
|
||||
public ProblemDetail handleRemoteApiException(RemoteApiException e) {
|
||||
return ProblemDetail.forStatusAndDetail(REMOTE_API_EMPTY_RESPONSE.getStatus(),
|
||||
REMOTE_API_EMPTY_RESPONSE.getMessage() + e.getAppUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.vaessl.app.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public class RemoteApiException extends RuntimeException {
|
||||
|
||||
private final String appUrl;
|
||||
}
|
||||
Reference in New Issue
Block a user