Errors
Errors are identified by their code and belong to one of three different realms:
Name | Description |
---|---|
realm |
error realm (string): server , api , user |
code |
error code (string): identifier and CSV key for the error |
parameters |
parameters for the error (map string ↦ string, optional): only for user errors that require parameters |
description |
error description (string, optional): only for server and API errors |
uuid |
internal error UUID (string, optional): only for server errors |
API Errors
The requester made an error using the API. Normally it is a syntax error, such as a type mismatch or something missing. The response HTTP status code is 400.
The error code
begins with "error.api"
and represents a specialized class of API errors.
The error description
is a text in English.
Example:
GET /api/collection/objects
{
"realm": "api",
"code": "error.api.positional_parameter_expected",
"description": "Positional parameter expected: /api/collection/objects/<id>"
}
Currently supported API errors are:
Error | Description |
---|---|
error.api.generic |
API errors that do not fit into the other categories |
error.api.invalid_request_method |
API call does not support the request method |
error.api.invalid_content |
The request content is invalid (bad content-type, empty body…) |
error.api.invalid_api |
The API call is invalid (for example: /api/foo) |
error.api.attribute_expected |
An attribute was expected in a JSON definition |
error.api.type_mismatch |
The type of an attribute is wrong |
error.api.invalid_value |
The value of an attribute is wrong |
error.api.positional_parameter_expected |
A positional parameter is expected |
error.api.attribute_not_accepted |
An attribute provided by the user is not accepted |
error.api.invalid_maskset |
The provided maskset is malformed |
error.api.eas |
A 400 error from EAS occurred |
error.api.suggest_lock_taken |
API Call tried to rebuild the suggest index while it was already building |
Server errors
An internal server error occurred which prevented the fulfilment of the request. The response HTTP status code is 500.
The error code
begins with "error.server"
and the description
is a text in English.
Server errors also provide the parameter uuid
, which can be used to retrieve the error details using
/api/server/error.
Example:
{
"realm": "server",
"code": "error.server.generic",
"description": "Something terrible happened",
"uuid": "a089420d-d44c-4d4d-949f-ef041f203047"
}
Currently supported server errors are:
Error | Description |
---|---|
error.server.generic |
for unexpected errors from inside easydb |
error.server.database |
for unexpected errors caused by the database |
error.server.elasticsearch |
for unexpected errors caused by Elasticsearch |
error.server.eas |
for unexpected errors caused by EAS |
error.server.internal_file_error |
for unexpected file operation errors |
User errors
User errors are errors that can be triggered by the user. The response HTTP status code is 400. They are localized (the CSV key is the error code) and may have parameters to be used with the localized texts.
The code
begins with "error.user"
. The different user errors are discussed in more detail below.
Example:
GET /api/collection/objects/99
{
"realm": "user",
"code": "error.user.collection_not_found",
"parameters": {
"id": "99"
}
}
Rights management
The session is not authenticated.
Authentication Method Not Allowed (
error.user.authentication_method_not_allowed
)
The authentication method that was provided is nto allowed
method
: the authentication method
There are pending tasks associated with this session that require confirmation.
The user lacks the right to perform a certain operation.
operation
:"create"
,"read"
,"update"
,"delete"
,"fill"
(collection objects manipulation)type
: the name of the objecttype or base typeids
: affected IDs (a comma-separated list of IDs or"-"
)right
: name of the rightextra_info
(optional): used for rights with parameters to specify parameter information
Insufficient Rights After Transition (
error.user.insufficient_rights_after_transition
)
The user lost the right to perform a certain operation after a transition. It has the same parameters as "error.user.insufficient_rights"
.
The user revokes a right he had before. It has the same parameters as "error.user.insufficient_rights"
.
Change Owner On Creation (
error.user.change_owner_on_creation
)
The user attempts to create a new base or user object with a different owner.
Invalid Owner On Creation (
error.user.invalid_owner_on_creation
)
The user attempts to create a new user object with an invalid owner.
The user lacks a system right in order to perform a certain operation
right
: name of the rightextra_info
: if the system right has any parameters and something is missing there will be information here
Inserting an object into a collection would grant a right to it that the collection owner lacks (as "grantable"
).
collection
: id of the collectionobjecttype
: objecttype of the affected objectobject_id
: id of the affected objectright
: name of the rightextra_info
(optional): used for rights with parameters to specify parameter information
Upload limit exceeded
filename
: file nameclass
: file class (including"other"
), or"global"
if the limit is the global updload limitlimit
: value of the limit
Upload Type Not Allowed (
error.user.upload_type_not_allowed
)
Uploaded file type is not allowes
filename
: file nameclass
: file classextension
: the file extension detected for the file
General data manipulation errors
These errors can occur in different API calls (user and base objects).
The user tries to update an older version of an entity.
provided
: version provided by userexpected
: expected version
Integrity Constraint Violation (
error.user.integrity_constraint_violation
)
The operation violates an integrity constraint, including: unique
, restrict
constraint
: name of the constraint
Foreign Key Constraint Violation (
error.user.foreign_key_constraint_violation
)
The operation violates a foreign key constraint
constraint
: name of the constraint
Check Constraint Violation (
error.user.check_constraint_violation
)
The operation violates a check constraint
constraint
: name of the constraint
The operation violates a not null constraint, i.e. a required attribute was not provided or was empty
column
: column name
The requested user object could not be found
objecttype
: objecttype nameid
: object ID
The requested instance could not be found
id
: instance ID
User management
The server cannot find the given user
id
: the user ID
The server cannot find the given group
id
: the group ID
Password is not accepted due to policy
hint
: a hint describing the policy (this is a l10n field provided in the base config and it is rendered in the session language)
Password is not accepted because it is repeated
Wrong password
Authentication Token Expired (
error.user.authentication_token_expired
)
The user is using an authentication token that has expired. The authentication token is only used in the password reset process and should not be confused with the session token.
Authentication Token Used (
error.user.authentication_token_used
)
The user is using an authentication token that has already been used
Forgotten Password Process Disabled (
error.user.forgotten_password_process_disabled
)
Forgotten password process disabled by frontend configuration
The user has no e-mail address
The user has provided more than one primary e-mail addresses
The user is trying to set an inactive e-mail to be primary
Intended Primary Check Number (
error.user.intended_primary_check_number
)
The user has provided more than one intended primary e-mail addresses
Intended Primary Check Requested (
error.user.intended_primary_check_requested
)
The user is trying to set an e-mail to be intended primary without requesting confirmation
Email Confirmation Not Required (
error.user.email_confirmation_not_required
)
The e-mail does not need confirmation
Email Already Confirmed (
error.user.email_already_confirmed
)
The e-mail was already confirmed
The server cannot find the given e-mail
id
: the e-mail
Email Confirmation Failed (
error.user.email_confirmation_failed
)
E-mail confirmation failed
User Update System Group (
error.user.user_update_system_group
)
The user tries to put a user in a system group
user_id
: the user IDgroup_id
: the system group ID
Attribute cannot be updated because the user is a system user
user_id
: the system user IDattribute
: the attribute that the user was trying to update
User cannot be deleted because it is a system user
user_id
: the system user ID
Invalid User Type Change (
error.user.invalid_user_type_change
)
Invalid user type change: it is only possible to change the type of an "email"
user to "easydb"
.
user_id
: the user ID, or"<new>"
if the user is attempting to set the type of the user on creation.
A user is attempting to disable its own login
The provided e-mail already exists in the system
address
: the e-mail address
Group cannot be deleted because it is a system group
group_id
: the system group ID
Register User Login Or Email Required (
error.user.register_user_login_or_email_required
)
Attempting to register as new user without login nor e-mail address
Attempting to assign the "system.user.create_new"
right with type "custom"
but without specifying the "custom_type"
Attempting to create a user without group when "require_group"
was set
Login Change Not Allowed For Email User (
error.user.login_change_not_allowed_for_email_user
)
Attempting to change the login of an "email"
user
Schema and maskset manipulation
The user provided a table name that does not comply with the rules defined.
name
: the provided table name
The user provided a column name that does not comply with the rules defined.
name
: the provided column name
The user provided a mask name that does not comply with the rules defined.
name
: the provided mask name
No preferred mask specified in the maskset for the given objecttype.
objecttype
: objecttype for which no mask was found
More Than One Preferred Masks (
error.user.more_than_one_preferred_masks
)
More than one preferred masks specified in the maskset for the given objecttype.
objecttype
: objecttype for which more than one masks were found
User object manipulation
The server cannot find the given object
id
: the object ID
Depending on how the user specified the object ID, it can be a global object ID or a combination of objecttype and ID.
- If it is a global object ID, it will contain a
"@"
- If not, it will have the form:
"<objecttype>:<id>"
The user provided an object without owner
The user requested an object using an old schema version and a mask that did not exist in that version.
mask_name
: requested mask namemask_id
: mask id (in the current schema version)schema_version
: requested schema version
The user requested an object version for which no old schema version could be found.
objecttype
: type of the requested objectid
: object idobject_version
: requested object version
No Mask Defined For Collection (
error.user.no_mask_defined_for_collection
)
The user attempts to create objects in a collection using /api/db with the collection
parameter.
The collection has no mask defined for object creation.
collection_id
: collection id
No Pool Defined For Collection (
error.user.no_pool_defined_for_collection
)
The user attempts to create objects in a collection using /api/db with the collection
parameter.
The objecttype has a pool link, but the collection has no pool defined for object creation.
collection_id
: collection id
Bad Objecttype For Collection (
error.user.bad_objecttype_for_collection
)
The user attempts to create objects in a collection using /api/db with the collection
parameter.
The objecttype is not the one configured in the collection for object creation.
collection_id
: collection idexpected_objecttype_id
: expected objecttype id
Bad Mask For Collection (
error.user.bad_mask_for_collection
)
The user attempts to create objects in a collection using /api/db with the collection
parameter.
The provided mask is not the one configured in the collection for object creation.
collection_id
: collection idexpected_mask_id
: expected mask id
Bad Pool For Collection (
error.user.bad_pool_for_collection
)
The user attempts to create objects in a collection using /api/db with the collection
parameter.
The objecttype has a pool link, but the provided pool is not the one configured in the collection for object creation.
collection_id
: collection idexpected_pool_id
: expected pool id
Collection Is Not Under User Collection (
error.user.collection_is_not_under_user_collection
)
The user is trying to create or move a collection outside of the user collection tree.
The operation was rejected by a transition.
message
: a message describing the reason, if the transition defines it; else, a generic message containing the transition ID
The confirm code for the operation is invalid.
A mask with mask filter was provided for POST /api/db
mask
: mask name
The user is trying to link an object to the root pool
object_id
: the object ID, or"<new>"
if it is a new object
Pool errors
The server cannot find the given pool
id
: the pool ID
The user is trying to create a pool but has not specified a parent
System Pool Update Parent (
error.user.system_pool_update_parent
)
The user is trying to change the parent of a system pool
id
: the pool ID
The user is trying to delete a system pool
id
: the pool ID
Collection errors
The server cannot find the given collection
id
: the collection ID
Collection Does Not Allow Children (
error.user.collection_does_not_allow_children
)
The user is trying to create or move a collection under a collection that does not allow children
id
: the collection ID of the collection that does not allow children
Collection Requires Parent (
error.user.collection_requires_parent
)
The user is trying to create a collection but has not specified a parent
System Collection Update (
error.user.system_collection_update
)
The user is trying to change an attribute of a system collection which cannot be changed
id
: the collection ID
System Collection Delete (
error.user.system_collection_delete
)
The user is trying to delete a system collection
id
: the collection ID
Collection User Secret Already Exists (
error.user.collection_user_secret_already_exists
)
There is a user associated with the secret provided for a new collection user
secret
: the text provided as secret
Collection Sharing Inactive (
error.user.collection_sharing_inactive
)
The ACL entry that enables collection sharing for the provided credentials is not active
Collection Sharing Too Soon (
error.user.collection_sharing_too_soon
)
The ACL entry that enables collection sharing for the provided credentials is not valid yet
timestamp
: the"valid_from"
field from the ACL entry
Collection Sharing Too Late (
error.user.collection_sharing_too_late
)
The ACL entry that enables collection sharing for the provided credentials is no longer valid
timestamp
: the"valid_to"
field from the ACL entry
Collection Name Repeated (
error.user.collection_name_repeated
)
There already exists a collection with the given name under the same parent collection
Export errors
The user is trying to start an export which is already running.
The user is trying to create a scheduled export with no name.
Search/suggest errors
The user provided an objecttype for which no mask was found
objecttype
: the objecttype name
Session errors
The server cannot find the given session
id
: the session token
The session provided is invalid
Username or Password Empty (
error.user.username_or_password_empty
)
The user provided an empty user or password when authenticating
Login failed
Login failed because it was disabled
Login failed because it was disabled in a certain datetime range: from
from
: datestamp from
Login failed because it was disabled in a certain datetime range: to
to
: datestamp to
Other errors
The server cannot find the given tag
id
: the tag ID
The server cannot find the given right
id
: the right ID
The server cannot find the given message
id
: the message ID
The server cannot find the given objecttype
id
: the objecttype name
The server cannot find the given mask
id
: the mask name
The server cannot find the given event
id
: the event ID
The server cannot find the given error
id
: the error UUID
The server cannot find the given language
id
: the language
EAS cannot find the given asset
id
: the asset ID
The provided value does not meet the expected form (i.e. a regex)
variable
: the name of the variable for which the value was setvalue
: the provided valuehint
: a text explaining why the value is not accepted
The server cannot find the given right preset
id
: the ID of the right preset
There are no masks available for the objecttype / pool combination provided to /api/db_info/create
objecttype
: the objecttype providedpool
: the pool provided- if the objecttype has no available pools,
"-"
is returned; this call should not have been made because the previous create call (without"objecttype"
should not list this one) - if the objecttype has no pool link,
"N/A"
is returned
- if the objecttype has no available pools,
The user attempts to POST en event whose type has been disabled via base config
event_type
: the type of the event
The user provided an invalid value for an attribute
attribute
: the name of the attributevalue
: the value provided by the userexpected_format
: the format expected for the attribute
Using /api/objects without the required base config parameter