Package com.networknt.exception
Class ApiException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.networknt.exception.ApiException
-
- All Implemented Interfaces:
Serializable
public class ApiException extends Exception
This is a checked exception that can wrap Status object to give consume a uniform response. It is recommended that the business handler to catch this exception and respond to the request; however, the ExceptionHandler in this module will capture it and translate into a meaningful error response. Note that ExceptionHandler is a middleware handler and it is plugged in by default and can be turned off via configuration.- Author:
- Steve Hu
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ApiException(Status status)ApiException(Status status, Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatusgetStatus()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-