Application
err:unkey:application:invalid_input
Client provided input that failed validation
Example
What Happened?
This error occurs when your request contains input data that doesn’t meet Unkey’s validation requirements. This could be due to missing required fields, values that are out of allowed ranges, incorrectly formatted data, or other validation failures.
Common validation issues include:
- Missing required fields
- Values that exceed minimum or maximum limits
- Strings that don’t match required patterns
- Invalid formats for IDs, emails, or other structured data
- Type mismatches (e.g., providing a string where a number is expected)
Here’s an example of a request that would trigger this error:
How To Fix
To fix this error, carefully review the error details provided in the response. The errors
array contains specific information about what failed validation:
- Check the
location
field to identify which part of your request is problematic - Read the
message
field for details about why validation failed - Look at the
fix
field (if available) for guidance on how to correct the issue - Modify your request to comply with the validation requirements
Here’s the corrected version of our example request:
Common Mistakes
- Ignoring schema requirements: Not checking the API documentation for field requirements
- Range violations: Providing values outside of allowed ranges (too small, too large)
- Format errors: Not following the required format for IDs, emails, or other structured data
- Missing fields: Omitting required fields in API requests
- Type errors: Sending the wrong data type (e.g., string instead of number)
Related Errors
- err:unkey:application:assertion_failed - When a runtime assertion or invariant check fails
- err:unkey:application:protected_resource - When attempting to modify a protected resource