Closed netrebel closed 8 years ago
I think this has been fixed in the commit part of the develop
branch: https://github.com/twitter/finatra/commit/36afd2c4f0dfa29108e336bdd60a534a414a9a28
The comments of the commit match the documentation available.
I'm using v2.1.5
, the latest available at the moment.
Hi @netrebel, the latest version of Finatra is v2.5.0. That is why the documentation does not match with what you're using.
Previously, users had to override the exceptionMapperModule in their server to control this behavior, but as you found via the docs, that is no longer the case.
@netrebel the latest available version of Finatra is version 2.5.0. Please update if you can and follow the instructions as listed in the documentation. See #346 as this is a duplicate.
Duplicate of #346.
Not able to override the default mapper for
CaseClassMappingException
in theExceptionManager
.Expected behavior
According to the documentation: "If a user wants to swap out any of these defaults they simply need add their own mapper to the manager for the exception type to map."
Actual behavior
Adding a mapper to
CaseClassMappingException
throws the following exception:Looking at finatra source code, ExceptionManager.scala checks if the mapper already contains the Throwable and if so, it throws an Exception.
Steps to reproduce the behavior
.exceptionMapper[MyCaseClassMappingExceptionMapper]
And run the application. Exception thrown in during initial boot sequence.