Errors & Troubleshooting

Common error codes, causes, and solutions for the PaperStack API.

Errors & Troubleshooting

HTTP Status Codes

CodeMeaningCause
200OKRequest succeeded
302RedirectRoot endpoint redirects to API reference
400Bad RequestInvalid year format or malformed URL
401UnauthorizedMissing or malformed API key
403ForbiddenInvalid, expired, or revoked API key
404Not FoundExam, year, shift, or file does not exist
405Method Not AllowedOnly GET requests are supported
429Too Many RequestsRate limit exceeded
500Internal Server ErrorSomething went wrong on our side
502Bad GatewayAuthentication service unreachable

Common Errors

"Missing API key"

Cause: The Authorization header was not provided.

Solution: Add the header to your request:

curl -H "Authorization: Bearer ps_xxxxx" https://api.paperstack.qzz.io/neet/2024/s1/physics.json

"Malformed Authorization header"

Cause: The header format is incorrect.

Solution: Ensure your header uses the exact format:

Authorization: Bearer ps_your_key_here

"Invalid or expired API key"

Cause: The key does not exist, has been revoked, or has expired.

Solutions:

  • Check that you copied the full key (starts with ps_)
  • Generate a new key from your Dashboard
  • Ensure you haven't accidentally revoked the key

"Rate limit exceeded"

Cause: You've exceeded your plan's rate limit.

Free tier limits: 2 requests/second, 1,000 requests/month.

Solutions:

  • Add retry logic with exponential backoff
  • Reduce request frequency
  • Upgrade to a higher tier (coming soon)

"Shift not found"

Cause: The shift identifier does not match any available shift.

Solution: List available shifts first:

curl https://api.paperstack.qzz.io/neet/2024

Then use one of the listed shift names.

"File not found"

Cause: The requested file does not exist for the given shift.

Valid files:

  • physics.json
  • chemistry.json
  • biology.json (NEET only)
  • mathematics.json (JEE Main only)

Response Format

All error responses follow this structure:

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

Debugging Tips

  1. Verify your key starts with ps_
  2. Check the URL for typos in exam names (neet, not neet2024)
  3. List available years before querying specific data
  4. Use the API Reference at /docs/reference to test endpoints interactively
  5. Monitor your usage on the Dashboard

On this page