Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to contain multiple messages for CPFormatViolation #51

Open
chuwy opened this issue Oct 9, 2020 · 1 comment
Open

Comments

@chuwy
Copy link
Contributor

chuwy commented Oct 9, 2020

In enrich we techincally can extract 1+ FailureDetails.CPFormatViolationMessage. But since Failure.CPFormatViolation supports only single message, we're forced to return NonEmptyList[BadRow.CPFormatViolation] in loaders, which is confusing and misleading - only single payload or single error can be returned by toCollectorPayload.

An easier workaround would be to short-circuit toCollectorPayload on first error as it's rare enough for two errors to happen at once, but I'd like to preserve as much info as possible.

@chuwy
Copy link
Contributor Author

chuwy commented Oct 9, 2020

This should be collector_payload_format_violation/2-0-0 and since we're bumping model anyway, it's worth to change property names to something less ambigous, e.g. messages to cpFormatViolationMessages - a very long name, but I think this namespacing is the best way to avoid collisions #50

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

No branches or pull requests

1 participant