Skip to content
JEE Main & JEE Advanced datasets — Coming Soon

Errors & Troubleshooting

HTTP status codes, error responses, and solutions for the PaperStack API.

Errors & Troubleshooting

HTTP Status Codes

CodeMeaningCause
200OKRequest succeeded
302RedirectRoot endpoint redirects to API reference
400Bad RequestInvalid year format, filename, or malformed URL
401UnauthorizedMissing or malformed Authorization header
403ForbiddenInvalid, expired, or revoked API key; no remaining credits
404Not FoundExam, year, shift, file, or diagram does not exist
429Too Many RequestsRate limit exceeded (check your plan's limit)
500Internal Server ErrorGateway misconfiguration
502Bad GatewayAuthentication service (Unkey) or data origin temporarily unavailable

Error Response Format

All errors return JSON with a single field:

{
  "error": "Human-readable error description"
}

Full Error Code Reference

400 Bad Request

Error MessageCauseSolution
Invalid year format.Year parameter is not a 4-digit numberUse a valid year like 2024
Invalid filename.File name doesn't match expected patternUse paper.json, physics.json, etc.

401 Unauthorized

Error MessageCauseSolution
Missing API key. Include it as: Authorization: Bearer ps_xxxxNo Authorization header presentAdd Authorization: Bearer <your_key> to all data requests
Malformed Authorization header. Expected: Bearer ps_xxxxHeader doesn't match Bearer <key> formatCheck your header format: Authorization: Bearer ps_xxxx

403 Forbidden

Error MessageCauseSolution
Invalid or expired API key.Key doesn't exist, revoked, or expiredCreate a new key in your dashboard
API key has no remaining credits.Key's credit balance is zeroRefill the key or create a new one

404 Not Found

Error MessageCauseSolution
Not found. Use: /{exam}/{year}/{shift}/{file}URL path has fewer than 4 segmentsFollow the pattern: /neet/2024/s1/physics.json
Shift "xxx" not found for neet/2024.Shift identifier doesn't match any available shiftList available shifts via GET /neet/2024
File not found. Check year, shift, and filename.The specific file doesn't existVerify the filename (paper.json, physics.json, etc.)

429 Too Many Requests

Error MessageCauseSolution
Rate limit exceeded. Max 2 req/s.You've exceeded your plan's rate limitWait at least one second before retrying

500 Internal Server Error

Error MessageCauseSolution
Internal server error.Unexpected gateway errorRetry the request; contact support if persistent
Gateway misconfigured: UNKEY_API_ID is not set.Server configuration issueContact PaperStack support
Gateway misconfigured: CDN_BACKEND_URL is not set.Server configuration issueContact PaperStack support

502 Bad Gateway

Error MessageCauseSolution
Auth error (HTTP xxx): ...Authentication service (Unkey) returned an errorRetry; check status page for outages
Auth unreachable: ...Authentication service is unreachableRetry; check status page for outages

Common Errors

Debugging Tips

  1. Test with curl first — isolate your integration from application logic
  2. Check the status pagepaperstack.instatus.com shows real-time API health
  3. Verify your API key — ensure it hasn't expired or been revoked in your dashboard
  4. Check URL format — paths are case-sensitive; use lowercase for exams and shift identifiers
  5. Monitor usage — your dashboard shows request volume and error rates
  6. Enable verbose logging — log status and error fields for every API response during development
Was this page helpful?

On this page