Repository navigation
server: return protocol error bodies for HTTP failures - #92
Merged
Merged
Conversation
littlegrasscao
marked this pull request as ready for review
September 15, 2026 18:56
This was referenced Sep 15, 2026
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
September 16, 2026 21:51
5aba83f to
93250a9
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
September 22, 2026 16:42
93250a9 to
5a34448
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
September 25, 2026 22:26
5a34448 to
a849dc5
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
September 25, 2026 22:31
a849dc5 to
34f17c2
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
September 25, 2026 22:37
34f17c2 to
6643c01
Compare
zhu-tom
added this pull request to stack #111
October 1, 2026 18:55
littlegrasscao
removed this pull request from stack #111
October 1, 2026 20:19
littlegrasscao
added this pull request to stack #112
October 1, 2026 20:20
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
2 times, most recently
from
October 2, 2026 16:40
4ca0f12 to
257ea90
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
October 5, 2026 23:57
356aae1 to
32c2f78
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
October 6, 2026 00:05
32c2f78 to
614f257
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
October 6, 2026 00:14
614f257 to
a313bfd
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
October 6, 2026 00:31
a313bfd to
7dc0c8b
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
October 8, 2026 00:44
af0ce28 to
2aae10c
Compare
zhu-tom
reviewed
Oct 8, 2026
zhu-tom
approved these changes
Oct 8, 2026
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
11 times, most recently
from
October 14, 2026 19:24
2fe8844 to
8a4a275
Compare
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
October 19, 2026 17:12
8a4a275 to
4734c9f
Compare
added 10 commits
October 19, 2026 15:30
… standalone server.
… by Armeria hosts.
littlegrasscao
force-pushed
the
server/split2/05-http-errors
branch
from
October 19, 2026 22:30
4734c9f to
9bbdbd8
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{errorCode, message}JSON body throughApiExceptionHandler, an Armeria exception handler and decorator that any Armeria host can registerApiFailuremaps failures to a status, error code, and message:ApiExceptionkeeps its own status and codeRESOURCE_DOES_NOT_EXIST; a denied asset is 403PERMISSION_DENIED; an unsupported asset type is 400INVALID_PARAMETER_VALUECatalogAuthenticationException, a caller token the catalog cannot authenticate, is 401UNAUTHENTICATED, withWWW-Authenticate: BearerCatalogAuthorizationException, a caller without the requested privilege, is 403PERMISSION_DENIEDCATALOG_ERROR; unreadable bodies and illegal arguments are 400; uniqueness violations are 409RESOURCE_ALREADY_EXISTS; anything else is 500INTERNAL_ERRORCatalogAuthenticationExceptionTesting
mvn clean install: 65 tests passedApiFailureTest: every failure mapping, including 401 for catalog authentication failuresApiExceptionHandlerTest: Armeria's own failures (unrouted requests, other statuses, unreadable bodies, invalid parameters), the JSON body,WWW-Authenticateon 401, and failures a service throws or its response fails withUnknownRouteTest: an unknown route on the standalone server is a 404 with the protocol bodyLocalCatalogConnectorTest: an unknown token is aCatalogAuthenticationExceptionStacked on #91.