7 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_OBAPI_ERROR_MAP table.

The contents of the table are as follows:

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_OBAPI_ERROR_MAP(DIGX_ERROR_CODE,BERLIN_ERROR_CODE,PATH,URL) 
values ('%%OBAPI 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_OBAPI_ERROR_MAP;

For configuring HTTP status codes with custom message, below script can be used:

Insert into DIGX_FW_CONFIG_ALL_B (PROP_ID, CATEGORY_ID, PROP_VALUE, FACTORY_SHIPPED_FLAG, 
PROP_COMMENTS, SUMMARY_TEXT, CREATED_BY,CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATED_DATE, OBJECT_STATUS, OBJECT_VERSION_NUMBER)
values ('%%HTTP Status code%%','OpenBankingErrorConfig','%%Error Message%%','N',null,
'OpenBanking Error Message','ofssuser',sysdate,'ofssuser',sysdate,'Y',1);

Below Query is used to check the Open Banking HTTP status codes in the system select * from digx_fw_config_all_b where category_id = ' OpenBankingErrorConfig';