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

Improve type error reporting #559

Open
mikearnaldi opened this issue May 5, 2024 · 2 comments
Open

Improve type error reporting #559

mikearnaldi opened this issue May 5, 2024 · 2 comments

Comments

@mikearnaldi
Copy link

When a handler raises a non expected error we get unknown comparison, it should instead mention that the error can't be accepted. I believe this can be done by adapting the signature of the handle function

Screenshot 2024-05-05 at 15 49 05
@mikearnaldi mikearnaldi changed the title Improve error reporting Improve type error reporting May 5, 2024
@sukovanej
Copy link
Owner

Could you please send a snippet or push this somewhere? On the type level, the error channel of a handler function is not constrained. The RouterBuilder.handle only excludes ServerError from the E and passthroughs the rest.

@mikearnaldi
Copy link
Author

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

No branches or pull requests

2 participants