Open chuwy opened 4 years ago
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
In
enrich
we techincally can extract 1+FailureDetails.CPFormatViolationMessage
. But sinceFailure.CPFormatViolation
supports only single message, we're forced to returnNonEmptyList[BadRow.CPFormatViolation]
in loaders, which is confusing and misleading - only single payload or single error can be returned bytoCollectorPayload
.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.