stargate: Move ExceptionMappers out of sgv2-quarkus-common
io.stargate.sgv2.api.common.exception within sgv2-quarkus-common package defines a few exception mappers which are meant to be shared across different APIs. I am trying to implement a custom RuntimeExceptionMapper (see https://github.com/li-boxuan/cassandra-dynamoDB-adapter/pull/3) but unfortunately, Quarkus sometimes picks up the RuntimeExceptionMapper from sgv2-quarkus-common package in a non-deterministic way.
I tried the priority annotation as suggested by https://github.com/quarkusio/quarkus/issues/7883 but that didn’t work. The only way I can think of is to move ExceptionMappers out of sgv2-quarkus-common - maybe another package, or copy the mappers to individual API packages?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (21 by maintainers)
Commits related to this issue
- closes #2248: common exception mappers must be explicitly enabled — committed to stargate/stargate by deleted user 2 years ago
- closes #2248: configurable exception handling and mapping — committed to stargate/stargate by deleted user 2 years ago
- closes #2248: configurable exception handling and mapping — committed to stargate/stargate by deleted user 2 years ago
- closes #2248: configurable exception handling and mapping — committed to stargate/stargate by deleted user 2 years ago
- closes #2248: configurable exception handling and mapping — committed to stargate/stargate by deleted user 2 years ago
- closes #2248: configurable exception handling and mapping (#2317) — committed to stargate/stargate by deleted user 2 years ago
Fix coming in https://github.com/quarkusio/quarkus/pull/29459, will wait for this to be released and make mappers optional…
@li-boxuan Just specify
stargate.exception-mappers.enabled=falseprop in theapplication.yaml… If you need to send a custom response on the missing token, let me know and I can tell you how to implement this. You basically need to register aChallengeSenderimplementation in your app…Let’ me try to reproduce this. Thanks for the heads up.