Constructor
new NotAcceptableError(dataopt)
NotAcceptableError constructor
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
data | Object | | <optional> | Error message or options  | 
- Source
 
Extends
Members
status
Error status
- Overrides
 - Source
 
404 Not Found451 Unavailable For Legal Reasons500 Internal Server ErrorMethods
toJSON() → {Object}
Plain object representation of the error
- Overrides
 - Source
 
Returns:
- Type:
 - Object
 
Example
// returned JSON
{
  error: {
    code: 400,
    requestId: '123456-test-request-id',
    message: 'Baaaaaad Request :-(',
    details: 'Check your request body'
  }
}toPojo() → {Object}
Plain object representation of the error
- Overrides
 - Source
 
Returns:
- Type:
 - Object
 
Example
// returned object
{
  error: {
    code: 400,
    requestId: '123456-test-request-id',
    message: 'Baaaaaad Request :-(',
    details: 'Check your request body'
  }
}toString() → {string}
String representation of the error
- Overrides
 - Source
 
Returns:
- Type:
 - string
 
Example
// returned string
{"error":{"code":400,"requestId":"123456-test-request-id","message":"Baaaaaad Request :-(","details":"Check your request body"}}