Troubleshooting
Common issues and solutions when using Petnow SDK
Overview
This document covers platform-agnostic common issues that may occur when using Petnow SDK and their solutions. For platform-specific details, please refer to each platform's documentation.
API Authentication Issues
API Key Authentication Failure
Symptoms
401 Unauthorizedwhen calling the API, with error codePETNOWB2B10000403 ForbiddenwithPETNOWB2B10010if the account's API access is suspended
Causes
- Incorrect API Key (wrong key, or stray whitespace/special characters)
- The API Key has been deactivated (e.g. disabled or rotated in the Petify Console). There is no Bundle ID binding or key expiry, so neither causes this error.
PETNOWB2B10010(403): the account's API access is suspended due to a billing/payment-method issue — not a key problem.
Solutions
- Verify the API Key — confirm it is the correct key with no stray whitespace or special characters.
- Confirm the key is active in the Petify Console; if it was deactivated, reissue it (create a new key) — deactivated keys cannot be reactivated.
- For
PETNOWB2B10010, resolve the billing/payment-method issue in the Petify Console.
Biometric Upload Issues
Image Upload Failure
Symptoms
- Timeout or network error during file upload
FILE_TOO_LARGEerror
Causes
- File size exceeds limit (recommended: under 5MB)
- Unstable network connection
- Incorrect file format (only JPEG supported)
Solutions
- Compress images
- Adjust JPEG quality to 80-90%
- Adjust resolution to appropriate size (1920x1080 recommended)
- Implement retry logic
- Use exponential backoff
- Recommend max 3 retries
- Verify file format
- Upload only JPEG format
- Confirm file extension matches actual format
Job Polling Timeout
Symptoms
- Job status remains in
PENDINGstate - Unable to receive final result
Causes
- Server processing delay (low image quality or complex case)
- Incorrect Job ID
- Polling interval too short or timeout too short
Solutions
- Optimize polling settings
- Polling interval: 2-3 seconds recommended
- Max wait time: 60 seconds recommended
- Handle by job status
PENDING: Continue pollingSUCCESS: Process resultFAILED: Handle error and retry
- Re-upload on timeout
- Retry with new Job
Capture Session Issues
Symptoms
SESSION_NOT_FOUNDerrorSESSION_ALREADY_ENDEDerrorSESSION_TIMEOUTerror
Causes
- Session expired
- Attempting to upload to already ended session
- Incorrect session ID
Solutions
- Create new capture session
- Quickly upload and complete after session creation
- Correctly store and pass session ID
Pet Profile Management Issues
Metadata Parsing Failure
Symptoms
- JSON parsing error when querying metadata
- Specific fields are null or missing
Causes
- Saved in incorrect JSON format
- Encoding/decoding mismatch
- Special character handling error
Solutions
- Validate metadata on save
- Verify valid JSON format
- Use UTF-8 encoding
- Implement safe parsing
- Handle optional fields
- Provide default values
- Error handling with try-catch
- Document metadata schema
- Define required fields
- Specify data types
Partial Pet List Returned
Symptoms
- Only some pets returned when querying pet list
- Registered pet not in list
Causes
- Pet registered with different API Key
- Pet was deleted
- Server filtering (when pagination is supported in future)
Solutions
- Confirm using correct API Key
- Try direct query with specific pet ID
- Check existence with
GET /v2/pets/{petId}
- Check existence with
- Refresh list immediately after pet registration
Identification/Verification Issues
Low Verify Accuracy (1:1 Matching)
Symptoms
- Same pet returns
isVerified: false - Low confidence score
Causes
- Image quality difference between registration and verification
- Different capture conditions (lighting, angle, focus)
- Insufficient registered biometric data (only 1-2 fingerprints registered)
Solutions
- Provide sufficient biometric data during registration
- Fingerprint (nose) images: minimum 5 or more
- Appearance images: captured from various angles
- Maintain consistent capture conditions
- Natural or uniform lighting
- Maintain frontal angle
- Sharp focus
- Adjust confidence threshold
- Set threshold according to business requirements
- Implement additional verification logic for low confidence
Too Many Identify Results (1:N Matching)
Symptoms
- Identification results include unrelated pets
- Low confidence for Top 1 result
Causes
- Many pets with similar appearance in database
- Low uploaded image quality
- Threshold setting too low
Solutions
- Filter by confidence
- Display only top N (e.g., Top 3)
- Apply minimum confidence threshold (e.g., 70 or above)
- Filter with additional metadata
- Pre-filter by species, breed, region, etc.
- Add user confirmation process
- Show results to user and let them select
Network Issues
Intermittent Timeouts
Symptoms
- API calls occasionally timeout
- Failures even with good network status
Causes
- Server load
- Client timeout setting too short
- Proxy or firewall configuration
Solutions
- Increase timeout
- Request timeout: 30 seconds or more
- Resource timeout: 60 seconds or more
- Implement retry logic
- Use exponential backoff
- Set max retry count
- Check network status before request
- Verify network connectivity
- Monitor connection state changes
CORS Error (Web Environment)
Symptoms
- CORS policy violation error in browser
Access-Control-Allow-Originrelated error
Cause
- CORS restriction when calling API directly from web environment
Solutions
- Use backend proxy
- Client → Your backend → Petnow API
- Request domain registration from Petnow representative
- Request to add allowed Origin
Performance and Optimization
Excessive API Calls
Symptoms
- Too many API calls in short time
- Unnecessary server load and cost
Causes
- Unnecessary duplicate calls
- Polling interval too short
- Not using caching
Solutions
- Response caching
- Use local cache for pet list, pet info
- Set TTL (e.g., 5 minutes)
- Optimize polling
- Job polling interval: 2-3 seconds
- Limit max polling count
- Apply Debouncing/Throttling
- Prevent consecutive requests
Increasing Memory Usage
Symptoms
- Memory leak after image upload
- App gradually slows down
Causes
- Image data kept in memory continuously
- Unlimited cache growth
- Missing resource cleanup
Solutions
- Release immediately after image processing
- Release original data after upload completion
- Delete temporary files
- Limit cache size
- Set max cache size (e.g., 100MB)
- Use LRU policy
- Handle memory warnings
- Clear cache on system memory warning
Error Codes
Server API errors are returned with PETNOWB2B... codes and an HTTP status. For the full list of codes with causes and solutions, see Server API – Error Codes.
Debugging Tips
1. Check Error Response Details
{
"error": {
"code": "ERROR_CODE",
"message": "Human readable message",
"field": "problematic_field",
"details": { "additional": "info" }
}
}3. Monitor Network Traffic
- Check network requests in developer tools
- Inspect request/response headers, body
- Analyze timing information
4. Collect Logs
- Record API call time, parameters, response
- Save full context when error occurs
- Create reproducible test cases
Support Request
If the problem is not resolved with the above solutions, please contact Petnow representative with the following information:
Required Information
- API Key (or masked form)
- Occurrence time (specify UTC or local timezone)
- Request parameters (excluding sensitive information)
- Error message and HTTP status code
- SDK version and platform information
Optional Information
- Reproduction steps
- Screenshots or log files
- Network environment (WiFi, 4G/5G, etc.)
- Difference between expected and actual behavior
Contact
- Email: support@petnow.io
- Direct contact with representative (contact provided upon contract)