Constructs a new InternalError
.
The main error message.
The HTTP status code to return.
Optional
causeAn application-unique, readable error code.
Optional
stackThe HTTP status code to associate with this error.
Static
Optional
prepareOptional override for formatting stack traces
Static
stackStatic
captureStatic
fromConverts an error into an InternalError
.
The error to convert.
An InternalError
that represents the given error.
Static
isChecks if an object is an instance of AbstractError
, or one of its subclasses.
The object to check.
Only check for similar looking error codes. You're going to want to use this if you're dealing with a setup where multiple versions of js-utils are loaded.
true
if the object is an AbstractError
, false
otherwise.
Used when an
Error
-like object was caught and converted into an implementation ofAbstractError
for further processing.