Skip to content

Allow flexible JSON error message formatting with DataSonnet #8987

@tnleeuw

Description

@tnleeuw

Related Problem or Business Case

The ErrorMessageFormatter produces a fixed layout which may not be what a project requires.

A more flexible mechanism is desired, using DataSonnet stylesheets, similar to the XslErrorMessageFormatter

Describe the Feature

Similar to the way the XslErrorMessageFormatter extends the ErrorMessageFormatter a DataSonnetErrorMessageFormatter can extend the default ErrorMessageFormatter and apply a DataSonnet JSON stylesheet with some extra input parameters to the default JSON Error Message.

Collaboration with External Companies

No, community resolution only

Anything else?

To avoid code duplication between the DataSonnetPipe and a DataSonnetErrorMessageFormatter, I intend to refactor the DataSonnet mapping code in the DataSonnetPipe into a standalone JsonMapping class (analogous to the XSLT TransformerPool).

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions