OpenTreeMap / otm-android

An OpenTreeMap client for Android. The OpenTreeMap code can be downloaded at https://github.com/OpenTreeMap/otm-core.
Other
23 stars 22 forks source link

Changed Login Failure Message #206

Closed Rszotak closed 9 years ago

Rszotak commented 9 years ago

Instead of using the could not connect to server message on login failure, new string created to inform the user that they entered an incorrect username or password.

maurizi commented 9 years ago

Thanks for your submission!

Unfortunately, I don't think this is the correct approach.

The previous error message was the right one to show sometimes (but not others).

What we need to do to fix this bug correctly is to inspect the exception the failure method receives and look at the cause of the error, and then show the appropriate error message based on the cause of the error.

So if the request timed out, we can show Could not connect to server, and if we receive a 401 status code, we can show Incorrect Username or Password

maurizi commented 9 years ago

Closing this in favour of #214, which fixes the issue in the manner described above.