Error Reference
type-mismatch
| Field | Value |
|---|---|
| Type URI | https://docs.kordiam.app/docs/errors/type-mismatch |
| HTTP Status | 400 Bad Request |
Description
A value in the request could not be converted to the expected type. This applies to query parameters, path variables, headers, and request body fields. For example, a string was provided where a number was expected, a number was provided where an object was expected, or a date value does not match the required format.
Response Examples
Parameter type mismatch
Code
Request body type mismatch
When the mismatch occurs inside the JSON request body, the response includes an errors array with the field path:
Code
Common Causes
- Passing a string value for a numeric parameter (e.g.,
id=abcinstead ofid=42) - Using an invalid date format (e.g.,
2026-13-01or01/01/2026instead of2026-01-01) - Supplying a non-boolean value for a boolean parameter (e.g.,
active=yesinstead ofactive=true) - Sending a primitive value (number, string) for a field that expects an object (e.g.,
"user": 123instead of"user": {"id": 123}) - Sending a single value where an array is expected, or vice versa
How to Fix
- Check the expected type for each field or parameter in the API reference.
- For parameter mismatches, read the
detailfield, which identifies the problematic parameter and the expected type. - For request body mismatches, inspect the
errorsarray — each entry includes thepathto the problematic field and amessagedescribing the expected vs. actual type.
Last modified on