Error Codes
Petnow Server API error codes and solutions guide.
Overview
Petnow API returns detailed error information along with HTTP status codes when an error occurs.
Error Response Format
{
"errors": [
{
"code": "PETNOWB2B10000"
}
]
}| Field | Type | Description |
|---|---|---|
errors | array | Error array |
errors[].code | string | Error code (PETNOWB2BXXXXX format) |
HTTP Status Codes
| Status Code | Description |
|---|---|
200 | Success |
201 | Resource created successfully |
204 | Deletion successful (no response body) |
400 | Bad request |
401 | Authentication failed |
403 | Permission denied |
404 | Resource not found |
500 | Internal server error |
Authentication Errors (401)
PETNOWB2B10000 - InvalidApiKeyException
Status Code: 401
{
"errors": [
{
"code": "PETNOWB2B10000"
}
]
}Cause
- Invalid API Key
- Missing API Key
- Deactivated API Key
Solution
- Check
x-petnow-api-keyheader - Use the correct Key for the environment (Staging/Production)
- Contact Petnow representative to verify Key status
Request Errors (400)
PETNOWB2B20002 - InvalidFingerprintIdException
Status Code: 400
{
"errors": [
{
"code": "PETNOWB2B20002"
}
]
}Cause
- Invalid fingerprint ID
Solution
- Use the ID returned from the upload response
- Verify correct UUID format
PETNOWB2B20003 - InvalidAppearanceIdException
Status Code: 400
{
"errors": [
{
"code": "PETNOWB2B20003"
}
]
}Cause
- Invalid appearance ID
Solution
- Use the ID returned from the upload response
- Verify correct UUID format
PETNOWB2B20007 - PetAlreadyHasFingerprintAdditionJobException
Status Code: 400
{
"errors": [
{
"code": "PETNOWB2B20007"
}
]
}Cause
- Pet already has an ongoing fingerprint addition job
Solution
- Wait for the existing job to complete
- Retry after polling job status
PETNOWB2B20009 - PetHasNoFingerprintException
Status Code: 400
{
"errors": [
{
"code": "PETNOWB2B20009"
}
]
}Cause
- Pet has no registered fingerprints during verification
Solution
- Complete fingerprint registration first
- Add fingerprints via
addFingerprintsendpoint
PETNOWB2B20011 - NoPetIdCaptureSessionException
Status Code: 400
{
"errors": [
{
"code": "PETNOWB2B20011"
}
]
}Cause
- Missing
petIdwhen creating session withPET_PROFILE_REGISTRATIONorPET_VERIFICATIONpurpose
Solution
- Include
petIdparameter when creating session PET_IDENTIFICATIONdoes not requirepetId
PETNOWB2B20012 - CaptureSessionIsNotFinishedException
Status Code: 400
{
"errors": [
{
"code": "PETNOWB2B20012"
}
]
}Cause
- Attempting to perform action while capture session is not yet finished
Solution
- Ensure sufficient files are uploaded to the session
- Check session status
Session Errors
PETNOWB2B20010 - NoSuchCaptureSessionException
Status Code: 404
{
"errors": [
{
"code": "PETNOWB2B20010"
}
]
}Cause
- Session ID does not exist
- Session has expired
Solution
- Verify session ID
- Create a new session
Resource Errors (404)
PETNOWB2B20000 - NoSuchPetException
Status Code: 404
{
"errors": [
{
"code": "PETNOWB2B20000"
}
]
}Cause
- Pet ID does not exist
- Pet has been deleted
Solution
- Verify pet ID
- Check existence via pet list endpoint
PETNOWB2B20001 - NoSuchVendorException
Status Code: 404
{
"errors": [
{
"code": "PETNOWB2B20001"
}
]
}Cause
- No vendor linked to the API Key
Solution
- Contact Petnow representative
PETNOWB2B20004 - NoSuchFingerprintAdditionJobException
Status Code: 404
{
"errors": [
{
"code": "PETNOWB2B20004"
}
]
}Cause
- Fingerprint addition job ID does not exist
Solution
- Verify job ID
- Start a new job
PETNOWB2B20005 - NoSuchPetVerificationJobException
Status Code: 404
{
"errors": [
{
"code": "PETNOWB2B20005"
}
]
}Cause
- Verification job ID does not exist
Solution
- Verify job ID
- Start a new verification job
PETNOWB2B20006 - NoSuchPetIdentificationJobException
Status Code: 404
{
"errors": [
{
"code": "PETNOWB2B20006"
}
]
}Cause
- Identification job ID does not exist
Solution
- Verify job ID
- Start a new identification job
PETNOWB2B20008 - PetNotRegisteredException
Status Code: 404
{
"errors": [
{
"code": "PETNOWB2B20008"
}
]
}Cause
- Pet is not yet registered
Solution
- Retry after completing pet registration
Server Errors (500)
PETNOWB2B30000 - UploadFailedException
Status Code: 500
{
"errors": [
{
"code": "PETNOWB2B30000"
}
]
}Cause
- Server error during file upload
Solution
- Retry after a short wait
- Verify file size and format
PETNOWB2B30001 - DownloadFailedException
Status Code: 500
{
"errors": [
{
"code": "PETNOWB2B30001"
}
]
}Cause
- Server error during file download
Solution
- Retry after a short wait
- Contact Petnow support if issue persists
PETNOWB2B30002 - UnknownSpeciesException
Status Code: 500
{
"errors": [
{
"code": "PETNOWB2B30002"
}
]
}Cause
- Unknown pet species
Solution
- Verify
speciesvalue isDOGorCAT
Error Handling Recommendations
Retry Logic
import time
import requests
def api_request_with_retry(url, method="GET", max_retries=3, **kwargs):
for attempt in range(max_retries):
try:
response = requests.request(method, url, **kwargs)
if response.status_code == 429:
time.sleep(60) # Rate limit wait
continue
if response.status_code >= 500:
time.sleep(2 ** attempt) # Exponential backoff
continue
return response
except requests.exceptions.RequestException as e:
if attempt == max_retries - 1:
raise
time.sleep(2 ** attempt)
return responseError Code Handling
async function handleApiError(response) {
const body = await response.json();
const errorCode = body.errors?.[0]?.code;
switch (errorCode) {
case "PETNOWB2B10000":
// Authentication error: Check API key
console.error("Authentication error: Invalid API key");
break;
case "PETNOWB2B20000":
case "PETNOWB2B20010":
// Resource not found: Need to recreate
console.warn("Resource not found");
break;
default:
console.error("API error:", errorCode);
}
}Support Request
If errors persist, contact Petnow representative with the following information:
Required Information
- Error code and message
- HTTP status code
- Request URL and parameters
- Timestamp (UTC)
- API Key (masked)
Contact
- Email: support@petnow.io