Extends
- Error
Members
code
Type:
Number
message
Type:
String
Constructor
- options optional
- Type:
ObjectorString options object or string message value
- code optional
- Type:
Integer - Default:
400 applies only when
apiCodeoption is not set- apiCode optional
- Type:
String - message optional
- Type:
message - Default:
'Bad Request' - desc optional
- Type:
message description for swagger doc spec - is intended to be used in child Error constructor only
new RequestError(options)
Fundamental request error. An application always responds on a request with
an error that is instance of RequestError (in case an error has been encoutered).
Errors encountered which are NOT instance of RequestError
will be converted before further processing so that the condition is met.
Parameters:
Methods
- uid
- Type:
StringorInteger request indentifier
setUID(uid)
Parameters:
toJSON()
Object
Returns:
Object
toLogger()
Object
similar to RequestError#toJSON except that it returns all information
available instead of just public user facing error description.
Object
toSwagger()
Object
Open API schema representation of the error response
Returns:Object