Skip to content

Handle Errors before After Handlers #170

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

Merged
merged 12 commits into from
Jan 26, 2025
Merged

Handle Errors before After Handlers #170

merged 12 commits into from
Jan 26, 2025

Conversation

SentryMan
Copy link
Collaborator

@SentryMan SentryMan commented Jan 22, 2025

Now Exceptions during handler processing will not skip after handlers

  • remove Exception from filter signature
  • Handler errors are caught and sent to the exception manager (exception thrown by filters abort the chain though)
  • Skip handler if a filter has already written a response

SentryMan and others added 7 commits January 20, 2025 22:26
It's possible that problems like IllegalAccessError may appear, causing socket hangups if unhandled
Bumps the dependencies group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| io.avaje:avaje-logback-encoder | `0.9` | `0.10` |
| io.avaje:avaje-http-api | `2.9-RC7` | `2.9-RC8` |
| io.avaje:avaje-htmx-api | `2.9-RC7` | `2.9-RC8` |
| [io.avaje:avaje-http-client](https://github.com./avaje/avaje-http-client) | `2.9-RC7` | `2.9-RC8` |
| io.avaje:avaje-http-client-generator | `2.9-RC7` | `2.9-RC8` |
| io.avaje:avaje-http-jex-generator | `2.9-RC7` | `2.9-RC8` |
| [io.github.robaho:httpserver](https://github.com./robaho/httpserver) | `1.0.19` | `1.0.21` |


Updates `io.avaje:avaje-logback-encoder` from 0.9 to 0.10

Updates `io.avaje:avaje-http-api` from 2.9-RC7 to 2.9-RC8

Updates `io.avaje:avaje-htmx-api` from 2.9-RC7 to 2.9-RC8

Updates `io.avaje:avaje-http-client` from 2.9-RC7 to 2.9-RC8
- [Release notes](https://github.com./avaje/avaje-http-client/releases)
- [Commits](https://github.com./avaje/avaje-http-client/commits)

Updates `io.avaje:avaje-http-client-generator` from 2.9-RC7 to 2.9-RC8

Updates `io.avaje:avaje-http-jex-generator` from 2.9-RC7 to 2.9-RC8

Updates `io.avaje:avaje-htmx-api` from 2.9-RC7 to 2.9-RC8

Updates `io.avaje:avaje-http-client` from 2.9-RC7 to 2.9-RC8
- [Release notes](https://github.com./avaje/avaje-http-client/releases)
- [Commits](https://github.com./avaje/avaje-http-client/commits)

Updates `io.avaje:avaje-http-client-generator` from 2.9-RC7 to 2.9-RC8

Updates `io.avaje:avaje-http-jex-generator` from 2.9-RC7 to 2.9-RC8

Updates `io.github.robaho:httpserver` from 1.0.19 to 1.0.21
- [Commits](robaho/httpserver@1.0.19...1.0.21)

---
updated-dependencies:
- dependency-name: io.avaje:avaje-logback-encoder
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-http-api
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-htmx-api
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-http-client
  dependency-type: direct:development
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-http-client-generator
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-http-jex-generator
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-htmx-api
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-http-client
  dependency-type: direct:development
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-http-client-generator
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: io.avaje:avaje-http-jex-generator
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: io.github.robaho:httpserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
It's possible that problems like IllegalAccessError may appear, causing socket hangups if unhandled
* tidy internals

- rename SPIServiceManager to ServiceManager
- move compression to serviceManager
- Use Enum `valueof` for HttpMethod mapping

* Update Routing.java
Now Exceptions during handler processing will not skip after handlers
-
@SentryMan SentryMan added this to the 3.0 milestone Jan 22, 2025
@SentryMan SentryMan requested a review from rbygrave January 22, 2025 23:00
@SentryMan SentryMan self-assigned this Jan 22, 2025
@SentryMan SentryMan changed the title Handler Errors before After Handlers Handle Errors before After Handlers Jan 23, 2025
@rbygrave rbygrave disabled auto-merge January 26, 2025 06:19
@rbygrave rbygrave merged commit a70d024 into avaje:master Jan 26, 2025
4 checks passed
@SentryMan SentryMan deleted the error branch January 26, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants