GoneError

"410 Gone" response error class.

Indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.

If you don't know whether this condition is temporary or permanent, a 404 status code should be used instead.

Constructor

new GoneError(dataopt)

GoneError constructor

Parameters:
NameTypeAttributesDescription
dataObject | String | ResponseErrorOptions | Options | undefined<optional>

Error message or options

Extends

Members

status

Error status

Examples
404 Not Found
451 Unavailable For Legal Reasons
500 Internal Server Error

Methods

toJSON() → {Object}

Plain object representation of the error

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

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

Returns:
Type: 
string
Example
// returned string
{"error":{"code":400,"requestId":"123456-test-request-id","message":"Baaaaaad Request :-(","details":"Check your request body"}}