Message-ID: <2026325178.3746.1485855143111.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3745_1703725317.1485855143111" ------=_Part_3745_1703725317.1485855143111 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Error handling

Error handling

=20
=20
=20
=20

Error handling in the REST API is fully based on HTTP error codes. As a = web developer, you are probably familiar with the most common ones: 40= 1 Unauthorized, 404 Not Found or 500 Internal Server Error. The REST A= PI uses those, along with a few more, to allow proper error handling.

The complete list of error codes used and the conditions in which they a= pply are specified in the reference documentation.

General error codes

A few error codes apply to most resources (if they are app= licable)

500 Internal Server Error

The server encountered an unexpected condition, usually an excepti= on, which prevented it from fulfilling the request: database down, permissi= ons or configuration error.

501 Not Implemented

Returned when the requested method has not yet been implemented. A= s of eZ Publish 5.0, most of User, User group, Content, Location and Conten= t Type have been implemented. Some of their methods, as well as other featu= res, may return a 501.

404 Not Found

Returned when the request failed because the request object was no= t found. You should be familiar with this one.

405 Method Not Allowed

Returned when the requested REST API resource doesn't support the = HTTP verb that was used.

406 Not Acceptable

Returned when an accept header sent with the requested isn't suppo= rted.

Error = handling in your REST implementation

It is up to you, in your client implementation, to handle those co= des by checking if an error code (4xx or 5xx) was returned instead of the e= xpected 2xx or 3xx.

=20
=20
=20
=20

In this topic:

=20
=20
=20
------=_Part_3745_1703725317.1485855143111--