nextgis / android_gisapp

:dart: GIS application for Android
http://nextgis.com/nextgis-mobile
GNU General Public License v3.0
134 stars 107 forks source link

Better HTTP error message #501

Closed simgislab closed 8 years ago

simgislab commented 8 years ago
  1. Add a NGFP form that links to a resource that is no longer available
  2. It shows few messages: Layer created -> 500 -> Cancelled

None of these messages is helpful.

Why 500, while NGW correctly returns 404? Why layer is created?

I'd expect one message, something like: "Remote resource is not available, can't add layer".

Sample form: https://www.dropbox.com/s/snv82osme525p9f/wolf_excr.ngfp?dl=0

4eRTuk commented 8 years ago

We work with API, so NGW returns 500 and JSON body with error text: http://mikhail.nextgis.com/api/resource/34

I think it should be unified and return 404 too (for error i18n in mobile app).

4eRTuk commented 8 years ago

JSON message values is shown in latest commit, I think we should discuss handling error statuses later.

4eRTuk commented 8 years ago

For example: remote resource is not available (500), not found (404), forbidden (403) etc. See #424 also.