If you're sending events in batches, all events within a given batch must be valid in order for the events to be successfully ingested.
If a single event in the batch is invalid, the entire batch is rejected and the API returns a 422 error.
What this means in practice
- One invalid event will cause all other events in the same batch to fail.
- In the Events Debugger, every event in that batch will display a
422error. - Only the event(s) that are intrinsically invalid (ie. there was an issue with the event as opposed to being invalidated due to another event) will include a specific error message in the response.
- The remaining events will also return
422, but without a detailed validation error, as they were rejected due to the batch failure.
Why this can be confusing
Because all events return 422, it may appear that multiple events are invalid. In reality, the issue may originate from just one malformed event, which causes the entire batch to be rejected. This can result in an inflated error count in the Events Debugger.
If you encounter this behavior, you can review the events from a single batch together in the Debugger to identify which event includes a detailed error message.