|
Just remember that we can not guarantee that we always return Json structured errors, "connection refused" is a prime example of one where our servers have no control over the message. So the client code must be able to handle plaintext error messages, at least in some way.
|
|
Heikki Levanto
Good point, I agree that the modules have no control over this and the client needs to be able to handle it.
By bad requests and server errors I was thinking about HTTP responses with a status code within the 400 and 500 ranges respectively. In my mind connection refused is a lower level error (I don't know if the javascript surfaces this differently). Are you referring to the same kind of error?
|
|
I wasn't thinking of any particular error codes. There can be all kind of proxies, load balancers, and firewalls between the client and our server, and each of those can come up with all kind of errors. As long as the client code can somehow handle those, it is OK. It doesn't have to be pretty, but at least the client should not crash and burn - especially if the client is also part of our services.
|