eclipse-ee4j / eclipse-ee4j/jersey

Priority for ExceptionMappers are not used

Open
#2,709 5 comments 0 reactions 0 assignees View on GitHub
Component: core Component: extensions exception exceptionshandl mvc Priority: Major Type: Bug
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

The ExceptionMapperFactory does not consider priorities for different registered ExceptionMappers. This means that if you have two registered ExceptionMappers for the same Exception, which one is used will be random.

This is made worse by the fact that MvcFeature registers it's own ExceptionMapper for Exception. So, if you use MvcFeature and want to register your own ExceptionMapper for Exception, you might end up using ErrorTemplateExceptionMapper, and you might end up using your own.
#### Affected Versions
[2.6]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.