Oihana PHP Arango

ErrorField uses ConstantsTrait

Field names returned by the ArangoDB server in JSON error responses.

A typical error body looks like:

{ "error": true, "code": 404, "errorNum": 1202, "errorMessage": "document not found" }

Use these constants when reading or building such bodies to avoid magic strings sprinkled across the client code.

Tags
see
https://docs.arangodb.com/stable/develop/http-api/general-request-handling/#error-handling
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Constants

CODE  : string = 'code'
HTTP-equivalent status code echoed by the server in the error body.
ERROR  : string = 'error'
Boolean flag set to `true` on error responses.
ERROR_MESSAGE  : string = 'errorMessage'
Human-readable error message returned by the server.
ERROR_NUM  : string = 'errorNum'
Internal ArangoDB error number (see {@see ErrorCode}).

Constants

CODE

HTTP-equivalent status code echoed by the server in the error body.

public string CODE = 'code'

ERROR

Boolean flag set to `true` on error responses.

public string ERROR = 'error'

ERROR_MESSAGE

Human-readable error message returned by the server.

public string ERROR_MESSAGE = 'errorMessage'

ERROR_NUM

Internal ArangoDB error number (see {@see ErrorCode}).

public string ERROR_NUM = 'errorNum'
On this page

Search results