Error Codes and Descriptions
General Error Codes
| Status Code | Description |
|---|---|
| (200 – 299) | Operation successful! |
| 401 | The provided token is invalid or expired. |
| 404 | The requested object was not found. |
| 400 | Missing or incorrect request |
| 500 | Used for unknown errors, please contact support. |
Language Selection
Info
Error messages are available in two languages: Turkish (tr) and English (en). You can specify the language by using the Accept-Language header in your request. If the header is not provided, Turkish (tr) is used by default.
curl --location --request GET '<BASE_URL>/main-categories'
--header 'Authorization: <jwtToken>'
--header 'Accept-Language: tr'
Response
{
"traceId": "16264259-9daa-40c4-bef5-418d2a89a4d0",
"exception": "MethodArgumentNotValidException",
"timestamp": 1693484146171,
"errors": [
{
"code": 3001,
"message": "Ürün garanti süresi 2 ile 10 arasında olmalıdır."
},
{
"code": 3001,
"message": "Marka boş olamaz."
}
]
}
code fieldThe numeric code value is not a fixed catalog you should hard-code against — it is set by whichever internal service ultimately validates your request, and can differ between error types. We recommend branching your error handling on the HTTP status code and the message text rather than on code.