Constructor
new ConflictError(dataopt)
ConflictError constructor
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data | Object | | <optional> | Error message or options |
- Source
Extends
Members
status
Error status
- Overrides
- Source
404 Not Found
451 Unavailable For Legal Reasons
500 Internal Server Error
Methods
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"}}