RTMError

RTMError

RTM Error Response

This Class represents a failed request to the RTM API Server: the RTM API Server returned a response with a status of 'fail'. This Class will include the error code and error message from the response.

RTMError extends RTMResponse

Constructor

new RTMError(code, msg)

Source:

Create a new RTM Error Response

Parameters:
Name Type Description
code number

Error Code

msg string

Error Message

Members

code :number

Source:

The RTM Error Code

Type:
  • number

msg :string

Source:

The RTM Error Message

Type:
  • string

Methods

(static) networkError() → {RTMError}

Source:

Create a new RTMError that represents a network error.

Error Code: -1

Returns:
Type
RTMError

(static) rateLimitError() → {RTMError}

Source:

Create a new RTMError that represents an RTM API Rate Limit (the RTM API returned a HTTP Status code of 503).

Error Code: -4

Returns:
Type
RTMError

(static) referenceError() → {RTMError}

Source:

Create a new RTMError that represents an index error (ie, task index is out of range).

Error Code: -3

Returns:
Type
RTMError

(static) responseError() → {RTMError}

Source:

Create a new RTMError that represents an API response error.

Error Code: -2

Returns:
Type
RTMError

(static) serverError() → {RTMError}

Source:

Create a new RTMError that represents an RTM API Server Error (the RTM API returned a HTTP Status code of 5xx - excluding 503).

Error Code: -5

Returns:
Type
RTMError

toString() → {string}

Source:

Get a String representation of the Error

Returns:
Type
string