Package ai.nightfall.scan.model
Class NightfallAPIException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ai.nightfall.scan.model.BaseNightfallException
ai.nightfall.scan.model.NightfallAPIException
- All Implemented Interfaces:
Serializable
The exception thrown when the Nightfall API returns an HTTP status code in the range [400, 599]. Embeds the
standard Nightfall error object for debugging.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNightfallAPIException(String message) Create a new instance of the exception.NightfallAPIException(String message, NightfallErrorResponse error, int httpStatusCode) Create a new instance of the exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
NightfallAPIException
Create a new instance of the exception.- Parameters:
message- an error message
-
NightfallAPIException
Create a new instance of the exception.- Parameters:
message- an error messageerror- the standardized error object returned by the Nightfall APIhttpStatusCode- the HTTP status code
-
-
Method Details
-
toString
-
getError
Get the error object returned by Nightfall.- Returns:
- the standard error object that was returned by the Nightfall API
-
getMessage
- Overrides:
getMessagein classThrowable
-