Error handling and extended error mode in Identity Manager
This article describes how you create descriptions for error handling.
An encoding description contains the information for the electronic personalization of a card. You import the encoding description from a file. This can be used in Smart ID Identity Manager
When an error occurs during an encoding, the default behaviour is to abort the encoding process. In this case, the JPKIEncoder will not return the field list with read values (like chip serial number, Integrated Circuit Card Serial Numbers (ICCSN), generated keys or certificates) but an error response, consisting of a numeric identifier and a description. However, in some use cases, the calling application needs to know the progress of the encoding process prior to the error. In this case, the Extended Error Mode can be activated and configured in the encoding description.
Using the extended error mode has the following effects in case of an error:
The JPKIEncoder returns a Success status response
Any values from the field list that were already set during the encoding are returned
The following additional information can be returned:
The status/error code
The status/error message
All steps expected to execute
The steps actually executed
Using this extended error mode does not return an error response as usual, but returns a success instead and the actual error as fields in the JPKIEncoder's field list
Define like this in the encoding description:
[Fields]
ResponseStatusId=
ResponseStatusText=
EncodingStepsAll=
EncodingStepsDone=
[Description]
ExtendedErrorMode=APPLY_ON_APP_ERRORS_ONLY
ResponseStatusIdField=ResponseStatusId
ResponseStatusTextField=ResponseStatusText
EncodingStepsAllField=EncodingStepsAll
EncodingStepsDoneField=EncodingStepsDone
[Application_A]
EncodingStep=WriteAuthCert
[Application_B]
EncodingStep=WriteCertList
Description of the elements:
Element | Description |
---|---|
ExtendedErrorMode | Activates the extended error mode. Possible values are:
|
ResponseStatusIdField | The field to hold the error code. In case of success, the field value is never set, but only if an actual error happens. |
ResponseStatusTextField | The field to hold the description text of the error. |
EncodingStepsAllField | The field to hold all steps expected to execute, separated by commas. |
EncodingStepsDoneField | The field to hold all steps that actually executed, separated by commas. In case of success, the value will be the same as in EncodingStepsAllField. |
EncodingStep | The name under which each application will appear in the EncodingStepsAllField and EncodingStepsDoneField. |