Error Handling
In case a request to our API fails, the return value of the endpoints follows standard HTTP status code conventions.
A detailed reason can be found in the response. Common codes indicating a client error are 400 (Bad Request) & 404 (Not Found).
To give some further information on the cause of the error the API also returns a standardised error object in the response body.
1
{
2
"code": "validation-failed",
3
"description": "The model sent in the request is invalid. See the validation errors for details.",
4
"link": "https://developers.awork.io/#response-types",
5
"space": "On Venus a day is longer than a year.",
6
"details": [
7
"Some more details about the error can go here.",
8
"Or here."
9
],
10
"validationErrors": [
11
{
12
"property": "Name",
13
"message": "'Name' should not be empty."
14
}
15
]
16
}
Copied!
    Description: A human-readable explanation for the cause of the error. For example:
      Identity cannot be invited to this workspace. The identity is already part of the workspace.
      The password is too simple
    Space: An interesting fact about space.
    Link: A link to the corresponding documentation.
    Details: Further explanations or hints on fixing the request.
    ValidationErrors: If the model validation failed, all violations are listed here.
Description
workspaceid-missing
The request is missing a valid team id. Most likely your token is invalid.
not-found
The requested resource could not be located.
entity-archived
The request tried to perform an operation with an archived entity.
duplication-violation
A property that requires a unique value detected a duplication.
database-commit
The commit to the database failed. Your changes have not been commited!
concurrency-violation
Concurrent processes changed data and created conflicts in the process.
date-dependency
Two or more date values are in violation with each other (e.g. start date after due date).
date-out-of-range
A single date value is not in its validity range (e.g. birth date in the future).
value-out-of-range
A value is not in its defined range of validity (e.g. negative prices).
invalid-operation
The request would have caused an illegal data state.
invalid-model
The body of the request is invalid or empty.
validation-failed
The model validation of the request failed.
server-error
An internal error occured.
already-exist-error
The request adds an entity which already exists.
invalid-filter-or-order
The request contains an invalid filter or sort statement.
illegal-property-transition
The request would cause a value transition which is not allowed.
unauthorized
The owner of the request has insufficient permissions.
invalid-batch-operation
The request for a batch operations is invalid.
deactivated-user
The request tried to perform an operation with a deactivated user.
request-body-too-large
The uploaded file exceeds the allowed size limit
insufficient-subscription-level
Your team does not have the required subscription level to use this feature. Upgrade to a higher plan.
insufficient-seats
Your team does not have enough remaining seats while trying to invite or activate users.

HTTP Status Codes

On each request to our API you get a response with a HTTP status code that indicates if it was successful.

Success Status Codes

1
GET 200 (OK) including the object(s)
2
POST 200 (OK) including the newly created object
3
202 (Accepted) for batch or background operations
4
204 (No content) for business operations without a return value
5
PUT 200 (OK) including the updated object
6
DELETE 204 (No content)
Copied!

Client Failure Status Codes

1
400 (Bad request) When the request model is invalid or the operation is not allowed
2
401 (Unauthorized) When the requesting user is lacking the necessary permissions for the request
3
404 (Not found) When a requested resource does not exist
Copied!
Last modified 5mo ago
Copy link