7 Extensibility and Code Conventions
This topic provides information on Extensibility and Code Conventions. Error Message Framework
The Error Message Framework helps convert the OBAPI error response according to the BERLIN Open Banking Specifications.
The error response structure for Open Banking Read/Write APIs is as follows:
{ “tppMesages” :
[
{ “category” : “”, “path” : “”, “code” : “”, “text” : “”
}
]
}The Berlin Open Banking specified error response is handled using
DIGX_OB_BERLIN_OBDX_ERROR_MAP table.
The contents of the table are as follows:
For more information on fields, refer to the field description table.
Table 7-1 Table 1
| Column Name | Description |
|---|---|
DIGX_ERROR_CODE |
Represents the OBAPI error codes. This is a Primary and Unique Key |
BERLIN_ERROR_CODE |
Represents the Open Banking specified error code |
PATH |
Represents the reference to the JSON Path of the field with error. Can be null. |
URL |
Represents the URL to help remediate the problem, or provide more information etc. Can be null. |
For mapping OBAPI error codes with Berlin Open Banking specified codes below script can be used:
Insert into DIGX_OB_BERLIN_OBDX_ERROR_MAP(DIGX_ERROR_CODE,BERLIN_ERROR_CODE,PATH,URL)
values ('%%OBDX ErrorCode%%',%%Open Banking specified error code%%','%%Path%%', '%%URL%%');Below Query is used to check the OBAPI errors mapped with BERLIN Open Banking specified error codes in the system
select * from DIGX_OB_BERLIN_OBDX_ERROR_MAP;For configuring HTTP status codes with custom message, below script can be used:
Insert into DIGX_CFG_CONFIG_ALL_B (PROP_ID,PROFILE,PROP_VALUE,ENTITY_SPECIFIC,EDITABLE,MANDATORY_OVERRIDE,PROPERTY_GROUP,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATED_DATE,OBJECT_VERSION_NUMBER,MODULE,IS_ENUMERATED,SEQUENCE,VALIDATION,OBJECT_STATUS) values ('OpenBankingErrorConfig.%%HTTP Status code%%','PROFILEVALUE','%%Error Message%%','N','N','N',null,'SYSTEM',sysdate,'SYS',sysdate,1,'openbanking','N',-1,'.*',null);Below Query is used to check the Open Banking HTTP status codes in the system
select * from digx_cfg_config_all_b where prop_id like '%OpenBankingErrorConfig%';