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

chore(errors): create client-facing errors #50

Merged
merged 5 commits into from
Dec 13, 2024
Merged

Conversation

r-birkner
Copy link
Contributor

@r-birkner r-birkner commented Nov 19, 2024

This PR differentiates how errors are logged internally and exposed externally. In particular, it introduces an HTML rendering for all errors for HTTP gateway requests.

It introduces a new internal error called HttpGatewayError that captures all errors that happen in the http-gateway library. Externally, we expose all these errors as a "service unavailable" as they are not actionable for the clients. We only
treat the no_healthy_nodes error specially as it occurs during subnet upgrades. We also give canister_not_found special treatment, even though it should actually not occur as ic-gateway performs a check before handing the request off to the http-gateway library.

@r-birkner r-birkner force-pushed the rjb/pretty-error-page branch from 43b0cb8 to 90d1f2b Compare December 9, 2024 11:02
@r-birkner r-birkner force-pushed the rjb/pretty-error-page branch 3 times, most recently from f5a0eeb to 8c363ba Compare December 13, 2024 09:11
@r-birkner r-birkner force-pushed the rjb/pretty-error-page branch from 8c363ba to fb9b2c4 Compare December 13, 2024 10:17
@r-birkner r-birkner marked this pull request as ready for review December 13, 2024 10:27
@r-birkner r-birkner requested a review from a team as a code owner December 13, 2024 10:27
@r-birkner r-birkner force-pushed the rjb/pretty-error-page branch 2 times, most recently from 654c591 to 9ae60f1 Compare December 13, 2024 13:50
@r-birkner r-birkner force-pushed the rjb/pretty-error-page branch from 9ae60f1 to d43134f Compare December 13, 2024 13:52
@r-birkner r-birkner merged commit d61450e into main Dec 13, 2024
3 checks passed
@r-birkner r-birkner deleted the rjb/pretty-error-page branch December 13, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants