Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Error handling

kkaefer edited this page · 1 revision

Server side

When a request to the server fails, you should call next() with an Error object. Setting the status on that object will send that status code back. The error reply depends on the Accept header, and will either be plain text or JSON.

To simplify error handling, Bones provides Error.HTTP which accepts a HTTP status code after the message or as first argument instead of a message.

Something went wrong with that request. Please try again.