REST API
Server Errors
In case of an error, the server responds with JSON object containing
error
field (error description in English). Error object also may
contain error_id
and error_data
fields. error_id
uniquely
identifies the error message and may be used for message translation.
error_data
contains additional data related to the error (e.g., for
invalid input parameters error, it may contain parameter names).
There is a tool extract_errors
to extract error identifiers from
Erlang server code. It extracts pairs of error_id
and error
values
in TSV (Tab Separated Values) format. E.g., to get error_id
identifiers for GDTI and analytics server code:
> ./extract_errors ./gdti_service ./analytic_service
analytic-missing_schema Current participant has no index schema.
analytic-missing_schema_field Field missing in participant index schema.
analytic-non_system Current participant must be system.
analytic-schema_load Couldn't load participant index schema.
gdti-bad_doc_type The requested document type isn't valid.
gdti-bad_prefix Company prefix doesn't match prefixes of participant.
gdti-big_doc_type Document type is too big for the company prefix.
gdti-global_doc_exists Document with the GDTI is already exists.
gdti-no_global_doc Couldn't find the requested global document.
gdti-no_req_widget Required widget missing in one of the sources.
gdti-not_owner Participant must be owner of the global document.