twilio / authy-java

Java Client for Twilio Authy Two-Factor Authentication (2FA) API
https://www.twilio.com/docs/authy/api
MIT License
65 stars 46 forks source link

Error Codes support #48

Closed schmohlio closed 6 years ago

schmohlio commented 6 years ago

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 commented 6 years ago

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?

yuniersoad commented 6 years ago

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.

suarezjulian commented 6 years ago

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