authy-java icon indicating copy to clipboard operation
authy-java copied to clipboard

Error Codes support

Open schmohlio opened this issue 8 years ago • 3 comments

Hello,

I'm attempting to align what's in the Authy Users API docs for a sample error response:

{
    "errors": {
        "email":"is invalid",
        "cellphone":"must be a valid cellphone number."
    }
}

as well as with this https://www.twilio.com/docs/authy/return-and-error-codes, with this java client. What is supposed to be returned from Error::getMessage?

schmohlio avatar Apr 27 '18 16:04 schmohlio

I noticed that this client uses a completely different set up endpoints and marshalled values than the current twilio documentation.

Do you guys have any plans to update this client?

schmohlio avatar Apr 30 '18 21:04 schmohlio

We are planning to add support for the Error Codes listed in the doc, error messages are not a good way to make decisions in your logic about what went wrong.

yuniersoad avatar May 01 '18 16:05 yuniersoad

@schmohlio we added support for error codes in authy-java-1.4.0. Please check that version.

suarezjulian avatar Jun 19 '18 20:06 suarezjulian