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 :
What it means
User pressed back
Incorrect Partner Key
4 & 10
User not Verified on Truecaller*
Truecaller App Internal Error
User pressed back while verification in process
User pressed "SKIP / USE ANOTHER NUMBER"
To handle ActivityNotFound Exception, in case Truecaller app fails to initiate
*Error Type 4 and Error Type 10 could arise in different conditions depending on whether the user has not registered on Truecaller app on their smartphone or if the user has deactivated their Truecaller profile at any point of time from the app.
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.