Package com.dani.bff.error
Class DownstreamServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.dani.bff.error.DownstreamServiceException
- All Implemented Interfaces:
Serializable
Signals that a downstream HTTP service did not provide a usable response.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDownstreamServiceException(String serviceName, org.springframework.http.HttpStatusCode statusCode, String responseBody) Creates an exception with downstream service context. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DownstreamServiceException
public DownstreamServiceException(String serviceName, org.springframework.http.HttpStatusCode statusCode, String responseBody) Creates an exception with downstream service context.- Parameters:
serviceName- logical downstream service namestatusCode- HTTP status returned by the downstream serviceresponseBody- summarized response body for diagnostics
-
-
Method Details
-
getServiceName
-
getStatusCode
public int getStatusCode()
-