Error response

This API returns a HTTP code different than "200 OK" only when a serious condition is encountered:

For other errors, a plain text content with mime type:

 text/x-qizx-error; charset=UTF-8.

is returned with a code 200. The format is described below.

Rationale: this choice is made so that errors can be handled even by some broken HTTP client libraries which cannot test the HTTP code properly.

Format

Error codes

BadRequest
the request is unknown or has invalid or missing parameters.
Server
incident in the server, for example on request on a stopped XML engine.
NotFound
attempt to access a non-existent Document or Collection.
AccessControl
user attempt to access Documents or Collections forbidden by the access-control mechanism.
XMLData
an error detected by the Qizx XML database engine.
Compilation

XQuery compile time error, in syntax or static analysis.

The next lines contain the location and message of each error.

Evaluation

XQuery evaluation error.

The description line begin with the XQuery error code. The next lines contain the XQuery stack trace.

Example:

Evaluation: FORG0001 cannot cast to xs:int : invalid value 'a' for integer type
in my:func (  ) as xs:int at line 2 column 6
 at line 1 column 4 
TimeOut
the time limit defined by the eval request, or by the server configuration has been reached.