Class: ErrorBase

classeur-api-client. ErrorBase

Base class for ClientError and ServerError objects.


new ErrorBase()

Deprecated:
  • You should never need to construct one of these directly they will be provided to callbacks for REST API operations as the first argument if they occur.
Source:

Extends

Members


<readonly, nullable> data :Object

The JSON-decoded response-data sent back from the server with the error.

JSON decoding failures will raise a module:classeur-api-client.ClientError instead. This field is only present if its value could be derived from the error object returned from the REST client.

Type:
  • Object
Deprecated:
  • This is usually not useful the properties `reason` and `status` are usually all that is contained in `data`, and they are directly readable from instances of this class.
Source:

<readonly, nullable> reason :String

Information sent back by the server indicating why a request failed.

This is usually the best source for detailed failure/debugging information. This field is only present if its value could be derived from the error object returned from the REST client.

Type:
  • String
Source:

<readonly, nullable> response :Object

The JSON-decoded response sent back from the server with the error.

JSON decoding failures will raise a module:classeur-api-client.ClientError instead. This field is only present if its value could be derived from the error object returned from the REST client.

Type:
  • Object
Deprecated:
  • This is usually not useful the properties `reason` and `status` are usually of more interest than `response`, and they are directly readable from instances of this class.
Source:

<readonly, nullable> shortReason :String

English version of ServerError#status.

This field is only present if its value could be derived from the error object returned from the REST client. Usually a short word or phrase explaining what a given error code means in HTTP convention.

Type:
  • String
Source: