Error codes
Here you can learn about error codes returned by our REST Image Recognition API, including their causes, and solutions for each one.
Note that, in addition to the generic HTTP status codes, we also return much more specific and informative error codes in the JSON response. All the specific error responses follow the same JSON format:
1
2
3
4
5
6
|
{
"error": {
"code": "ERROR_CODE",
"message": "A verbose description of the error"
}
}
|
We strongly recommend that you parse only the code field. The message field is intended solely for debugging purposes, and client services are not expected to parse it.
Client error codes
- TOKEN_MISSING
- TOKEN_WRONG
- TOKEN_INVALID
- IMAGE_MISSING
- IMAGE_TOO_LARGE
- IMAGE_TOO_SMALL
- IMAGE_TRANSPARENCY
- IMAGE_NO_DETAILS
- IMAGE_NOT_LOADED
- SCAN_QUOTA_EXCEEDED
Server error codes
- SERVER_ERROR
Client error codes
-
TOKEN_MISSING
-
- Cause:The token parameter is missing. We do not know which collection you want to search.
- Solution:Add the token parameter. Consider reading “Where do I get my token?“
- HTTP Status code:
1401 "Unauthorized" - API response:
123456{"error": {"code": "TOKEN_MISSING","message": "Token is missing"}}
-
TOKEN_WRONG
-
- Cause:The token parameter has a wrong syntax. It should be a 16 alpha-numeric string.
- Solution:Use the right token. Consider reading “Where do I get my token?“
- HTTP Status code:
1400 "Bad Request" - API response:
123456{"error": {"code": "TOKEN_WRONG","message": "Token should be a 16 characters string"}}
-
TOKEN_INVALID
-
- Cause:The token parameter is invalid. It is a 16 alpha-numeric string, but it does not exist.
- Solution:Use the right token. Consider reading “Where do I get my token?“
- HTTP Status code:
1403 "Forbidden" - API response:
123456{"error": {"code": "TOKEN_INVALID","message": "Token is invalid"}}
-
IMAGE_MISSING
-
- Cause:The image parameter is missing. We need a query image to perform a recognition.
- Solution:Add the image parameter.
- HTTP Status code:
1400 "Bad Request" - API response:
123456{"error": {"code": "IMAGE_MISSING","message": "Image is missing"}}
-
IMAGE_TOO_LARGE
-
- Cause:The query image is too large.
- Solution:Send a smaller image. Follow our guidelines for query images.
- HTTP Status code:
1400 "Bad Request" - API response:
123456{"error": {"code": "IMAGE_TOO_LARGE","message": "Image file size is too large"}}
-
IMAGE_TOO_SMALL
-
- Cause:The query image dimensions are too small.
- Solution:Send a bigger image. Follow our guidelines for query images.
- HTTP Status code:
1400 "Bad Request" - API response:
123456{"error": {"code": "IMAGE_TOO_SMALL","message": "Image dimensions are too small"}}
-
IMAGE_TRANSPARENCY
-
- Cause:The query image has alpha transparency. We do not support that.
- Solution:Send only supported formats. Follow our guidelines for query images.
- HTTP Status code:
1400 "Bad Request" - API response:
123456{"error": {"code": "IMAGE_TRANSPARENCY","message": "Alpha transparency is not supported"}}
-
IMAGE_NO_DETAILS
-
- Cause:The query image has not enough details to perform a recognition. Probably it was a blank image, or maybe a picture taken at a wall/floor with no details/patterns/objects on it.
- Solution:If the picture was taken by a user, suggest her to take a better picture of the object.Otherwise, follow our guidelines for query images.
- HTTP Status code:
1400 "Bad Request" - API response:
123456{"error": {"code": "IMAGE_NO_DETAILS","message": "Image lacks distinguishable details"}}
-
IMAGE_NOT_LOADED
-
- Cause:The query image could not be loaded. Probably it is corrupted, or in an unsupported format.
- Solution:Follow our guidelines for query images.
- HTTP Status code:
1400 "Bad Request" - API response:
123456{"error": {"code": "IMAGE_NOT_LOADED","message": "Image can’t be loaded"}}
-
SCAN_QUOTA_EXCEEDED
-
- Cause:You have reached your monthly visual scans limit.
- Solution:Upgrade you plan.
- HTTP Status code:
1403 "Forbidden" - API response:
123456{"error": {"code": "SCAN_QUOTA_EXCEEDED","message": "Monthly visual scans limit reached"}}
Server error codes
-
SERVER_ERROR
-
- Cause:We are sorry, it’s our fault!Our service had an internal error and could not fulfill your request. Most probably your recognition query went to a faulty component that was restarted, or was too slow to respond. It is a temporary thing, and the service will be back again in a few seconds.
Be sure that we are already working on fixing the problem! Our service has logged the error, saved the full stacktrace, and notified us in real-time.
- Solution:Try again in a few seconds.Should the problem persist, contact us.
- HTTP Status code:
1500 "Internal Server Error" - API response:
123456{"error": {"code": "SERVER_ERROR","message": "Internal Server Error"}}
- Cause:We are sorry, it’s our fault!Our service had an internal error and could not fulfill your request. Most probably your recognition query went to a faulty component that was restarted, or was too slow to respond. It is a temporary thing, and the service will be back again in a few seconds.