# ENTITY_TYPE_MISMATCH

- Surface: API
- HTTP status: 400
- Details: `{ expectedIdType: string | null, receivedIdType: string, eventDefinitionId: string, metricId?: string, runId?: string }`

## Cause

The Metric Event's Entity type did not match the Entity type declared by its published Event Definition Version.

## Fix

Send the Metric Event with the declared Entity type. If the Event Definition now describes a different Entity type, publish a new Version and then retry.

## Related

- [EVENT_SCHEMA_MISMATCH](https://splitch.dev/docs/error/EVENT_SCHEMA_MISMATCH)
- [EVENT_DEFINITION_UNPUBLISHED](https://splitch.dev/docs/error/EVENT_DEFINITION_UNPUBLISHED)
- [APP_MISMATCH](https://splitch.dev/docs/error/APP_MISMATCH)

Source: https://splitch.dev/docs/error/ENTITY_TYPE_MISMATCH