Handling Error Scenarios

The "onFailureProfileShared" callback method that you just implemented in the previous step helps you to handle all the possible failure cases when the user couldn't be verified successfully via the Truecaller flow.

Below are some of the possible failure scenarios and the corresponding error response that you receive for each of the cases :

Error Code

What it means

1

Network Failure

2

User pressed back

3

Incorrect Partner Key

4 & 10

User Not Verified on Truecaller

5

Truecaller App Internal Error

13

User pressed back while verification in process

14

User pressed "SKIP / USE ANOTHER NUMBER"

Apart from the above mentioned error cases, there are few other error scenarios that you may encounter under rare circumstances. For complete and exhaustive list of all the error cases, you can refer to TrueError.class within the SDK.

Please note that when you encounter any of the error scenarios and get the control in the "onFailureProfileShared()" method, you should redirect the user to your alternate verification flow.