Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A api
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • ironapi
  • api
  • Wiki
  • Api
  • Transitions

Transitions · Changes

Page history
Update Transitions authored Apr 06, 2022 by Andrea Pavlovic's avatar Andrea Pavlovic
Show whitespace changes
Inline Side-by-side
API/Transitions.md
View page @ c173aef7
......@@ -250,15 +250,104 @@ NOT YET DOCUMENTED
# Errors
When a transition fails, an error message is returned, it looks like this:
```json
{
"error": {
"error": {
"involvedAttributes": [
null
"parent"
],
"entity": null,
"module": null,
"errorDescription": "unexpected_backend_error",
"errorType": "SYSTEM",
"errorID": 429
"entity": "unit",
"errorType": "REQUIRED",
"errorDescription": "required",
"errorID": "1624",
"module": "core"
},
"hint": {
"requestBody": {
"name": "{{name}}",
"unit_type": "{{unit_type}}",
"parent": "{{parent}}",
"is_titular": "{{is_titular}}",
"description": "{{description}}"
},
"description": "Neue Unit.",
"invocationVerb": "POST",
"id": 349,
"preStateID": null,
"name": "site_admin_create",
"postStateID": null,
"category": "create",
"postState": null,
"requestBodyContentType": "application/json; charset=UTF-8",
"label": "neu",
"attributes": {
"is_titular": {
"required": false,
"name": "is_titular"
},
"description": {
"required": false,
"name": "description"
},
"parent": {
"name": "parent",
"required": true
},
"unit_type": {
"required": false,
"name": "unit_type"
},
"name": {
"required": true,
"name": "name"
}
},
"invocationUrl": "/data/core/unit/transitions/site_admin_create",
"preState": null
},
"db_reply": {
"errorCode": 1624
},
"message": "the database returned an error",
"path": "data/core/unit/3/transitions/site_admin_create",
"http_code": 400
}
}
```
The `error->error` entry has details of what type of error it is and additional information like which attributes are involved.
## errorType
These are the possible error types:
### COMPOUND
Attributes have to conform to a certain operator (e.g. equal).
### CUSTOM
A custom error defined for a project.
### REFERENTIAL
A reference is not found.
### REGEXP
An attribute does not conform to a regex.
### REQUIRED
One or more attributes are required.
### UNIQUENESS
One or more attributes should be unique but already exist in the database.
### SYSTEM
Various system errors, with `429 | unexpected_backend_error` being equivalent to an internal server error.
\ No newline at end of file
Clone repository
  • API
    • Available Endpoints
    • Changing Passwords
    • Form Input Types
    • Introduction
    • Logout
    • Plugins
    • Queries
    • Queries
      • Attributes
      • Context
      • Query Examples
      • Query Search Options
      • Referenced Instances
      • Saved Queries
    • Schema_Changes
    • Storing Files
View All Pages