Skip to content

Errors

For an invalid request, or when PreSign or PostSign fails, the AdES web API returns HTTP 400 with an error object:

{
"error": {
"type": "HG_INVALID_REQUEST",
"code": "66",
"message": "INVALID_PERSON_PIN",
"description": "Neispravan OIB osobe."
}
}
  • code – the first character identifies the API, the rest is the error number: 6 for PAdES (PDF), 7 for XAdES (XML), B for JAdES (JSON). For example, 66 is error 6 of PAdES, and B111 is error 111 of JAdES.
  • message – the public error name. In your code, rely on code or message, not on description.
  • description – a human-readable description of the error.
  • If a required field is missing from the request, type and code are empty, message is ERROR, and description lists the missing fields in English (for example The Token field is required.). Such a response also has status and traceId.
  • traceId – if the response contains one, include it when you report a problem to support.

The numbers are given without the API prefix; in a response, the number is preceded by 6, 7 or B, depending on the format.

Number message Meaning Recommended action
5 INVALID_PERSON_NAME_SURNAME Invalid name and surname of the person. Send the name and surname as written in the certificate, or omit them.
6 INVALID_PERSON_PIN Invalid OIB of the person. Check personNaturalData.pin and pinCountry.
10 INVALID_ORGANIZATION_NAME Invalid organisation name. Check personLegalData.name.
11 INVALID_ORGANIZATION_VAT Invalid OIB of the organisation. Check personLegalData.vat and vatCountry.
16 INVALID_VERIFICATION_CODE Invalid verification code. Use the codes from the response of step 1, each only once.
50 UNSUPPORTED_SIGNATURE_LEVEL Unsupported signature level. signatureLevel must be b, t, lt or lta.
60 INVALID_TSA_URL Invalid TSA URL. In tsaAccess.url, send the address of your time stamp service.
64 INVALID_TSA_CREDENTIALS Invalid TSA access data. Check the user name and password on the time stamp service’s page, or create a new password.
77 USER_CERTIFICATE_EXPIRED The user’s certificate has expired. The user must have a valid certificate.
80 INVALID_SIGNATURE_VALUE Invalid signature value. Send signedHash from step 5 without modification.
81 SIGNATURE_NOT_VERIFIED Signature verification failed. Check that hash, signedHash and userCertificate belong to the same document and transaction.
87 SIGNATURE_VISUAL_LOCATION_ON_PAGE_NOT_AVAILABLE The location on the page is not free for a visual. Choose another location or pageLocation 0 (see Visual).
111 POSTSIGN_BUILD_ERROR The signature could not be embedded. The prepared document has expired or userCertificate is not in hexadecimal. Repeat the process from step 1.
203 PDF_PASSWORD_PROTECTED The PDF is password-protected. Send a PDF without a password.
204 PDF_IS_ENCRYPTED The PDF is encrypted. Send an unencrypted PDF.

The table is an excerpt: numbers 5–87 and 203–204 are listed in the specification for PAdES, and 111 is returned by XAdES and JAdES. The errors that each API returns are given in its list of errors.

Each API returns the list of its errors, with descriptions in Croatian and English:

GET /pades/errors HTTP/1.1
Host: api.test.certilia.com
Authorization: Bearer <signing API key>

For XML and JSON the paths are /xades/errors and /jades/errors. The codes in the list have no API prefix: error 5 in the list has the code 65 in a PAdES web API response.

ePotpis returns an error in an error object with the fields status, id and message, for example:

{
"error": {
"status": 400,
"id": "00000000-0000-0000-0000-000000000000",
"message": "Invalid auth data",
"code": null
}
}

Depending on the message, check the following:

  • Invalid auth data – that systemId, serviceId and documentId are the ones from your service’s page (Integration tab), and that the service is active.
  • Parameter [hash] must be 64 character hexadecimal string. – that the hash from step 2 was passed on without modification.

When contacting support (esign@certilia.com), provide the token, the verification code and the traceId as text, not as a screenshot. The current status of the services and planned maintenance are published on the System status page in the portal.