Skip to content

server: add typed configuration and global error handling (3/N) - #2

Closed
littlegrasscao wants to merge 6 commits into
server/02-30-temporary-credentials-requestfrom
server/03-config-errors
Closed

littlegrasscao wants to merge 6 commits into
server/02-30-temporary-credentials-requestfrom
server/03-config-errors

Conversation

@littlegrasscao

Copy link
Copy Markdown
Owner

Summary

Part 3/N of splitting OpenSharing-IO#14.

Stacks on fork PR for server/02-protocol-http (upstream #19 stack).

  • OpenSharingProperties (opensharing.* configuration)
  • GlobalExceptionHandler mapping failures to {errorCode, message}
  • Minimal catalog exception types used by the handler
  • Listings pagination helper

Test plan

  • cd server && mvn test

Catalog exception types and GlobalExceptionHandler only; OpenSharing
configuration properties arrive with the features that need them.
@littlegrasscao
littlegrasscao force-pushed the server/02-protocol-http branch from d83406e to 4208709 Compare September 1, 2026 21:03
@littlegrasscao
littlegrasscao force-pushed the server/03-config-errors branch from d8dc9f7 to 642209f Compare September 1, 2026 21:04
@littlegrasscao
littlegrasscao changed the base branch from server/02-protocol-http to server/02-30-temporary-credentials-request September 1, 2026 21:05
Sun Cao added 5 commits September 1, 2026 15:03
Drop the server() sentinel and isServer(); access-denied messages
always name the caller.
Replace the two thin subclasses with CatalogException.Kind and static
factories; GlobalExceptionHandler maps each kind to the same responses
as before.
Keep CatalogException subclasses for each failure shape, but fold
access denied and catalog authentication into CatalogAuthorizationException
instead of two parallel types.
CatalogAuthorizationException no longer distinguishes reason; both map to
403 PERMISSION_DENIED with the exception message.
Catalog-specific exception types and their HTTP mapping belong with the
catalog connector PR, where connector code translates native catalog
failures into sharing-server exceptions.
@littlegrasscao

Copy link
Copy Markdown
Owner Author

Moved to upstream draft: OpenSharing-IO#20

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.

1 participant