6 Error and Response Codes

Response or error codes are generated after the JSON is posted.

Based on whether the request is successful or not, the applicable code is generated. As a part of the feedback process, any error which occurred in the prospect onboarding flow (authentication errors and database errors) are captured and reported. In case of any errors, the onboarding JSON must be resent after making corrections.

The following table has information on the response codes used.

Table 6-1 Response Codes

Response Status Codes Status Description Sample Response
200 The JSON is successfully posted. { "RequestID": 1001, "applicationId": "CIF200050799" }
401 The request is unauthorized (token is invalid). Authentication required
400
  1. The JSON structure is invalid or incorrect.
  2. The mandatory elements are not provided in the onboarding JSON.
  3. The data lengths of one or more attributes used in the JSON are invalid or incorrect.
  4. More than one Applicant ID with the same value.
{

    "timestamp": "2020-11-26T11:33:16.737+0000",

    "status": 400,

    "error": "Bad Request",

    "errors": [

        {

            "codes": [

                "NotBlank.request.prospect[0].applicantID",

                "NotBlank.request.prospect.applicantID",

                "NotBlank.prospect[0].applicantID",

                "NotBlank.prospect.applicantID",

                "NotBlank.applicantID",

                "NotBlank.java.lang.String",

                "NotBlank"

            ],

            "arguments": [

                {

                    "codes": [

                        "request.prospect[0].applicantID",

                        "prospect[0].applicantID"

                    ],

                    "arguments": null,

                    "defaultMessage": "prospect[0].applicantID",

                    "code": "prospect[0].applicantID"

                }

            ],

            "defaultMessage": "must not be blank",

            "objectName": "request",

            "field": "prospect[0].applicantID",

            "rejectedValue": null,

            "bindingFailure": false,

            "code": "NotBlank"

        },

        {

            "codes": [

                "NotBlank.request.prospect[0].displayName",

                "NotBlank.request.prospect.displayName",

                "NotBlank.prospect[0].displayName",

                "NotBlank.prospect.displayName",

                "NotBlank.displayName",

                "NotBlank.java.lang.String",

                "NotBlank"

            ],

            "arguments": [

                {

                    "codes": [

                        "request.prospect[0].displayName",

                        "prospect[0].displayName"

                    ],

                    "arguments": null,

                    "defaultMessage": "prospect[0].displayName",

                    "code": "prospect[0].displayName"

                }

            ],

            "defaultMessage": "must not be blank",

            "objectName": "request",

            "field": "prospect[0].displayName",

            "rejectedValue": null,

            "bindingFailure": false,

            "code": "NotBlank"

        },

        {

            "codes": [

                "AssertTrue.request.applicantIDUnique",

                "AssertTrue.applicantIDUnique",

                "AssertTrue.boolean",

                "AssertTrue"

            ],

            "arguments": [

                {

                    "codes": [

                        "request.applicantIDUnique",

                        "applicantIDUnique"

                    ],

                    "arguments": null,

                    "defaultMessage": "applicantIDUnique",

                    "code": "applicantIDUnique"

                }

            ],

            "defaultMessage": "Applicant ID should be unique in an application",

            "objectName": "request",

            "field": "applicantIDUnique",

            "rejectedValue": false,

            "bindingFailure": false,

            "code": "AssertTrue"

        }

    ],

    "message": "Validation failed for object='request'. Error count: 3",

    "path": "/kycob-prospect-service/prospect/v1/add"

}
400 There is no jurisdiction matched to a pipeline.
{

    "errorField": "Account Opening Jurisdiction",

    "errorMessage": "Pipeline Jobname not configured for the given jurisdiction",

    "rejectedValue": "EMEA"

}

<html>

<head>

    <title>401 Authorization Required</title>

</head>

<body bgcolor="white">

    <center>

        <h1>401 Authorization Required</h1>

    </center>

    <hr>

    <center> </center>

</body>

</html>
500 Server error The server encountered an unexpected condition that prevented it from fulfilling the request.