osm-spline / xappy.js

Xappy.JS
Other
37 stars 4 forks source link

make server respond consistent error messages #38

Closed mren closed 13 years ago

mren commented 13 years ago

as of 089f9c998d895d19ab4ef4091a81a4267386f656 the server does only ends the request when an error is detected. which error messages should we return? is there a spec for the xapi?

booo commented 13 years ago

The end event should close the connection.

We should return 500 on error if nothing was written to the socket. Else we should just close the connection.

slomo commented 13 years ago

I think the http standard is clear about this. http://en.wikipedia.org/wiki/HTTP_status_code

400 => User errors 500 => Unrecoverable system errors

mren commented 13 years ago

with yesterdays commit (4e8b6b012bbf1f53e9200db3fe4ce218accc7d1c) we have 400 for a parse error and 500 for a database error