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 mux errors #495

Merged
merged 3 commits into from
Oct 18, 2023
Merged

Conversation

HRogge
Copy link
Collaborator

@HRogge HRogge commented Oct 18, 2023

The user should be able to use its own error handler for the mux router. In addition to this the mux should not silently log an error if the API user provides a bad path pattern.

@Danielius1922 Danielius1922 merged commit 644ea5d into plgd-dev:master Oct 18, 2023
10 checks passed
@HRogge HRogge deleted the improve-mux-errors branch October 18, 2023 09:38
HRogge added a commit to HRogge/go-coap that referenced this pull request Oct 26, 2023
* A bad pattern for a handler is a developer error that can often break whole applications. Panic is more appropriate than just silently logging.

* Allow user to overwrite mux error handler

* Add a warning to HandleFunc about the panic
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.

2 participants