UriToLongError

"414 URI Too Long" response error class.

Indicates that the URI requested by the client is longer than the server is willing to interpret.

There are a few rare conditions when this might occur:

  • when a client has improperly converted a POST request to a GET request with long query information,
  • when the client has descended into a loop of redirection (for example, a redirected URI prefix that points to a suffix of itself),
  • or when the server is under attack by a client attempting to exploit potential security holes.

Constructor

new UriToLongError(dataopt)

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