public class ApiException extends RuntimeException
| Constructor and Description |
|---|
ApiException(String message,
int statusCode,
Map<String,String> headers,
ProblemDetails problemDetails,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
static ApiException |
create(int statusCode,
Map<String,String> headers,
ProblemDetails problemDetails,
Throwable cause)
Create an
ApiException. |
Map<String,String> |
getHeaders()
Returns the API response headers.
|
ProblemDetails |
getProblemDetails()
Returns the API problem details.
|
int |
getStatusCode()
Returns the API status code.
|
void |
setHeaders(Map<String,String> headers)
Sets the API response headers.
|
void |
setProblemDetails(ProblemDetails problemDetails)
Sets the API problem details.
|
void |
setStatusCode(int statusCode)
Sets the API status code.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static ApiException create(int statusCode, Map<String,String> headers, ProblemDetails problemDetails, Throwable cause)
ApiException. A default ProblemDetails will be created if a null value is given.statusCode - The response status code.headers - The response headers.problemDetails - The ProblemDetails response.cause - The cause.ApiExceptionpublic ProblemDetails getProblemDetails()
public void setProblemDetails(ProblemDetails problemDetails)
public int getStatusCode()
public void setStatusCode(int statusCode)
Copyright © 2025. All rights reserved.