Class: StatusCodes

StatusCodes


new StatusCodes()

A hashmap of status codes mapping to their handler functions.

Each status code calls a specific method that you need to implement if you want a custom handling. If you do not implement it, module:Core/Error.handleStatusCodesFallback will be used.

Methods


<static> 0(error, model, options)

If the error has textStatus property set to timeout, calls handleTimeoutError.

Parameters:
Name Type Description
error Api.HttpError

The AJAX error.

model Data/Bean | Data/BeanCollection

The model or collection on which the request was made.

options Object

A hash of options.


<static> 400(error)

Authentication or bad request error.

Calls one of the authentication errors handlers, based on the error code. Please check the list of possible handlers function in the description of this module. If no authentication error handler is implemented, it calls handleUnspecified400Error.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.


<static> 403(error)

Forbidden.

Calls handleForbiddenError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.


<static> 404(error)

Not found.

Calls handleNotFoundError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.


<static> 405(error)

Method not allowed.

Calls handleMethodNotAllowedError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.


<static> 409(error)

Conflict.

Calls handleMethodConflictError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.


<static> 412(error)

Precondition failed.

Calls handleHeaderPreconditionFailed.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.


<static> 422(error, model)

Precondition failure.

Clients can optionally sniff the error property in JSON for finer grained determination; the following values may be: missing_parameter, invalid_parameter

Calls handleValidationError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.

model Data/Bean | Data/BeanCollection

The model or collection on which the request was made.


<static> 424(error, model)

Request Method Failure.

Calls handleMethodFailureError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.

model Data/Bean | Data/BeanCollection

The model or collection on which the request was made.


<static> 500(error)

Internal server error

Calls handleServerError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.


<static> 502(error)

Bad Gateway

Calls handleServerError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.


<static> 503(error)

Service Unavailable

Calls handleServerError.

Parameters:
Name Type Description
error Api.HttpError

HTTP error.