Constructs a new UnknownError
.
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
captureCreate .stack property on a target object
Optional
constructorOpt: FunctionStatic
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 unknown, non-
Error
-like object was caught and converted into a realError
instance. Like when you catch athrow "boom"
, we will convert the caught"boom"
into anUnknownError
. To enrich anError
-like object that was caught, use the InternalError.