Onboarding, invalid error format

Hi dear ZATCA developers,

I would like to report the issue with incorrect format returned in case of invalid OTP provided

The following error is returned: Invalid OTP
For missing OTP the following format is returned: {"code":"Missing-OTP","message":"\"OTP is required field\""}

Please note that in the documentation it is completely different format:

{
  "errors": [
    {
      "code": "Invalid-OTP",
      "message": "The provided OTP is invalid"
    }
  ]
}

@Ankit_Tiwari could you please clarify the situation and notify your developers about this issue? Currently it is not trivial to handle errors from onboarding due to inconsistent format for different invalid scenarios. The consistent error should be returned preferably in JSON format.

Also is there a specific error for Expired OTP? Asking because in example and testing data you have 222222 as expired OTP.

Best regards,
Sergei

Dear @sergei.shishov, thank you for highlighting this. I have checked with developers and they confirmed format will be corrected in coming releases.

Thank you for the continuous support @Ankit_Tiwari