Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Investigating the Possibility of Supporting Multiple Refiners #77

Open
alimate opened this issue Apr 19, 2019 · 0 comments
Open

Investigating the Possibility of Supporting Multiple Refiners #77

alimate opened this issue Apr 19, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@alimate
Copy link
Owner

alimate commented Apr 19, 2019

Synopsis

Currently, one can only register at most one ExceptionRefiner instance to refine exceptions before processing them. That might be useful to extend this feature in a way that it supports multiple refiners.

Possible Use Cases

It's a common pattern to wrap some exceptions into other exceptions which are more appropriate to a particular abstraction level. For example, when Jackson fails to de-serialize a byte-array into a POJO, the thrown exception will be wrapped inside a Spring exception. The only way for us to handle those Jackson exceptions is to:

  1. Provide a built-in refiner to translate the Spring exception into the Jackson exception.
  2. And then handle that Jackson exception using another built-in WebErrorHandler.
@alimate alimate added the enhancement New feature or request label Apr 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant