thomas77
thomas77

Reputation: 1150

Configure JsonProcessingExceptionMapper to log in Dropwizard

I am working on a dropwizard application. I need to configure it to log the exception from JsonProcessingExceptionMapper.

Some of my config.yml file:

server:

type: simple

connector:
  type: http
  port: 0

requestLog:
  appenders: []

registerDefaultExceptionMappers: true

Been looking at JsonProcessingExceptionMapper and it's showDetail property but cannot figure it out. I am using dropwizard version 1.2.3

Upvotes: 4

Views: 711

Answers (1)

thomas77
thomas77

Reputation: 1150

Found it. I was missing the property detailedJsonProcessingExceptionMapper:

server
  registerDefaultExceptionMappers: true
  detailedJsonProcessingExceptionMapper: true

Could not find this in the documentation. Could anyone point me to the right place?

Upvotes: 4

Related Questions