RangeNotSatisfiableError

"416 Range Not Satisfiable" response error class.

Indicates that a server cannot serve the requested ranges. The most likely reason is that the document doesn't contain such ranges, or that the Range header value, though syntactically correct, doesn't make sense.

The 416 response message contains a Content-Range indicating an unsatisfied range (that is a '*') followed by a '/' and the current length of the resource.

Faced with this error, browsers usually either abort the operation (for example, a download will be considered as non-resumable) or ask for the whole document again.

Constructor

new RangeNotSatisfiableError(dataopt)

RangeNotSatisfiableError 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"}}