Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Log when XML formatters fail to create a serializer #6533

Closed
rynowak opened this issue Jul 12, 2017 · 0 comments
Closed

Log when XML formatters fail to create a serializer #6533

rynowak opened this issue Jul 12, 2017 · 0 comments
Assignees

Comments

@rynowak
Copy link
Member

rynowak commented Jul 12, 2017

See: #6527

We've also had similar issues reported in the past with DCS formatter.

What's discussed in #6527 is by design. The XML formatters swallow any and all exceptions that come from creating a serializer as part of the content negotiation process. When a user doesn't know this, we have to ask the user to write 4-5 lines of code just to figure out what's going wrong.

We should at a minimum add logging to the XML formatters to report this kind of usage as a warning. Now that the XML formatters are optional (off by default) it's much more likely that if you are using XML, then you intend all of your DTO's to be serializable by your XML formatter.

The current behavior was designed for a world where the XML formatters were on by default, but most users didn't really care about XML support. We wanted them to stay out of the way, but they are currently too far away. We could consider changing this in a 3.0.0 release and surfacing the exception.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants