[OSM-dev] Inconsistent server error replies

Till Harbaum / Lists lists at harbaum.org
Sun Sep 7 14:20:26 BST 2008


Hi,

Am Sonntag 07 September 2008 schrieb Tom Hughes:
> A single line text message is clearly not appropriate for a 404 caused 
> by using the wrong URL though as we have no idea if that came from a web 
> browser or a program using the API and in the web browser case we want 
> to send an HTML response.
If this happens while someone is accessing the api/xxx path on the server 
we can be quite confident that it's not a browser but a program accessing 
the api.

> In fact it's far more likely that it is a web browser as any program 
> that is sending the wrong URL is presumably only ever going to do so for 
> a short period while it is in development while a web user can type in 
> the wrong URL at any time.
You mean there are more people trying to access the api branch on the server
with the web browser than people with real api aware software trying
to access the server and running into problems there?

> To be honest I wouldn't expect a program to look at the body - just the 
> response code and string and the Error header.
Ok, i can do that. I just thought that getting additional information from the
body might help tracking down problems. But when doing a bunch of uploads,
then displaying html rendered error pages may just not be very useful. I'd
rather output a single line error message per uploaded item.

IMHO the question is: What problems do we want to catch and address? Do
we care for people accessing the api via their web browser and do we want to
make sure they get useful error messages? Or do we want to make sure that
software like josm and friends have a simple method of returning error 
information?

> If you want to improve our error handling though then please do feel 
> free - I'm sure you know where the repository is.
I won't just patch other peoples software without having asked why things 
are the way they are and without having come to the conclusion that my ideas
are sufficient better than yours. You say that you think the 404 should remain
valid html to make sure all browsers display it correctly and that ok with me.

Anyway, i can really live with the current state. I wasn't sure if this inconsistency
is by purpose and thought that someone may want to think about this.

Till




More information about the dev mailing list