# Error codes (/en/docs/api/native/media/errors)



[Guide →](/en/docs/developers/services/media/quickstart)

Native APIs return error.code, error.message, and error.details. Compatible APIs return error.message and repeat it in X-Cld-Error; non-ASCII header messages are percent-encoded.

| Code | Native HTTP | Compatible HTTP | Retryable |
| --- | --- | --- | --- |
| LIBRARY_NOT_FOUND | 404 | 404 | no |
| ASSET_NOT_FOUND | 404 | 404 | no |
| JOB_NOT_FOUND | 404 | 404 | no |
| UNDERSTANDING_NOT_FOUND | 404 | 404 | no |
| LIBRARY_INVALID_STATE | 409 | 400 | no |
| INVALID_PARAMS | 400 | 400 | no |
| INVALID_EXPRESSION | 400 | 400 | no |
| UNSUPPORTED | 400 | 400 | no |
| NOT_IMPLEMENTED | 501 | 400 | no |
| FILE_TOO_LARGE | 413 | 400 | no |
| FILE_EMPTY | 400 | 400 | no |
| UNSUPPORTED_MEDIA | 415 | 400 | no |
| FETCH_FAILED | 400 | 400 | no |
| LIMIT_EXCEEDED | 400 | 400 | no |
| CHUNK_INVALID | 400 | 400 | no |
| RATE_LIMITED | 429 | 420 | yes |
| CAPACITY | 503 | 500 | yes |
| UPSTREAM_FAILED | 502 | 500 | yes |

Use backoff for retryable errors. For other errors, correct the request or resource state first.

## Model configuration errors [#model-configuration-errors]

* 400 `INVALID_PARAMS`: a model call ID is unavailable (`Model <id> is not available`), the vision model does not support image input, or models contains unknown roles, blank IDs, or invalid values.
* 409 `LIBRARY_INVALID_STATE`: changing embedding when the library contains assets, including a reset that changes the model. The message is “库中已有素材时不能更换嵌入模型”.
* 502 `UPSTREAM_FAILED`: the model catalog cannot be queried while writing model configuration; retry with backoff.
