Skip to content

Error Handling ​

General error format ​

Most API calls return an error JSON document. The HTTP request is acknowledged with status 200 OK — errors are detected by evaluating the JSON.

json
{
  "statuscode": 500,
  "statusmsg": "Internal server error",
  "additionalstatusmsg": ""
}
FieldDescription
statuscodeError code (based on HTTP status codes)
statusmsgError message
additionalstatusmsgAdditional debug information (not for end users)

HTTP status codes ​

CodeMeaning
200Success (or error in the JSON)
400Missing or invalid parameter
401Missing or invalid token, no permission
404Resource not found
500Server error / exception

Exception: article images

The /articlesimage.jpg endpoint does not return an error JSON; it uses HTTP status codes exclusively for error handling.

  1. Always check the HTTP status code
  2. For 200: check whether statuscode is present in the JSON
  3. Treat statuscode 401 in the JSON like HTTP 401: token invalid or expired → get a new token
  4. Use additionalstatusmsg for debugging only; do not show it to end users

3D office WebKatalog 2.5 — ub.unitel GmbH