forked from line/armeria
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exception handler for annotated http service (line#847)
Motivation: Currently, there is no way to send a customized response when an exception is raised from an annotated http service method. We only have an HttpResponseException which sends an http status code without http body. Modifications: - Add `@ExceptionHandler` annotation in order to specify exception handler on annotated method. - Add ExceptionHandlerFunction to handle exception. - Rename HttpResponseException to HttpStatusException. - Add HttpResponseException which holds an HttpResponse as its member. - Rename `@Decorate` to `@Decorator` and make it repeatable. - Remove ResourceNotFoundException and ServiceUnavailableException. Use HttpStatusException instead. Result: We can specify exception handlers on annotated method.
- Loading branch information
Showing
26 changed files
with
825 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.