RequestError

Extends

  • Error
code
Type:
Number
message
Type:
String
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:
  • options optional
    • Type: Object or String
    • options object or string message value

      • code optional
        • Type: Integer
        • Default: 400
        • applies only when apiCode option 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

setUID(uid)
Parameters:
  • uid
    • Type: String or Integer
    • request indentifier

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.

Returns: Object
toSwagger()Object

Open API schema representation of the error response

Returns: Object
comments powered by Disqus