Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Hono specific error codes #747

Open
ctron opened this issue Aug 2, 2018 · 0 comments
Open

Provide Hono specific error codes #747

ctron opened this issue Aug 2, 2018 · 0 comments

Comments

@ctron
Copy link
Contributor

ctron commented Aug 2, 2018

From the last few days of testing with Hono I think we need some kind of "Hono error codes". Which then translate into HTTP error codes. Yet, those Hono specific error codes should be reported back in e.g. the HTTP response (of possible by the underlying protocol).

Hono HTTP Text Actual problem
1001 503 no credit available for sending request The RequestResponse client has no credit to send a request to the tenant service
2001 503 no credit available for sending request The RequestResponse client has no credit to send a request to the registry service
3001 503 no credit available for sending request The RequestResponse client has no credit to send a request to the credentials service
1002 503 request timed out after 200ms A request to the tenant service timed out after 200ms
2002 503 request timed out after 200ms A request to the registry service timed out after 200ms
3002 503 request timed out after 200ms A request to the credentials service timed out after 200ms

Of course this table is not complete, but only there to show the problem.

In the result you will always get "503" and a text which isn't helping either. Sometimes you run into "temporarily unavailable", which again masks out a complete set of problems.

Yes, there is the console/log. But if you have a sporadic problem and 150 pods of the HTTP protocol adapter running, then the logs are useless. As is OpenTracing/Jaeger, as you can't really catch all requests and store them forever.

So I think it would make sense to define some kind of Hono specific error. That error may by itself contain a mapping to a HTTP error code, or at least this could be done in a single location, in order to be consistent. For HTTP the error code could be reported back using an HTTP property in the response header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant