Constructs a new InvalidOperationError
.
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 operation was attempted that can not be completed in the current context.