Skip to main content
Internal Documentation Only: If you’re not a Null Tools developer, you can close this documentation or visit the Apps section to learn more about using Null Pass in your applications.

Error Response Format

All errors follow a consistent format:

Status Codes

OK
Request successful
Created
Resource created successfully (e.g., user registration)
Bad Request
Validation error or invalid request format
  • Missing required fields
  • Invalid data format
  • Validation rule violations (e.g., password too short)
Unauthorized
Authentication required or failed
  • Missing Authorization header
  • Invalid or expired token
  • Invalid credentials
  • Invalid 2FA code
Forbidden
Request blocked by security system
  • Rate limit exceeded (Arcjet)
  • Bot detected (Arcjet)
  • Shield protection triggered
Not Found
Resource not found
  • User not found
  • Session not found
  • Invalid endpoint
Conflict
Resource conflict
  • User already exists
  • Duplicate resource
Internal Server Error
Server error
  • Database error
  • Unexpected exception
  • Configuration error

Common Error Scenarios

Validation Errors (400)

Causes:
  • Invalid email format
  • Password too short
  • Missing required fields
  • Invalid data types

Authentication Errors (401)

Causes:
  • Wrong email/password
  • Expired token
  • Invalid 2FA code
  • Missing Authorization header

Rate Limit Errors (403)

Causes:
  • Too many requests in short time
  • Bot detection triggered
  • Shield protection activated

Not Found Errors (404)

Causes:
  • Invalid user ID
  • Resource deleted
  • Invalid endpoint path

Error Handling Best Practices

Implement exponential backoff for:
  • 500 errors (server errors)
  • 403 errors (rate limits)
  • Network failures
Don’t retry:
  • 400 errors (validation - fix request)
  • 401 errors (authentication - re-authenticate)
  • 404 errors (not found - check resource)
Log all errors with:
  • Error message
  • Status code
  • Request details (without sensitive data)
  • Timestamp
  • User ID (if authenticated)

Internal Error Logging

Errors are logged server-side with different levels:
  • Warn: Validation errors, failed auth attempts
  • Error: Server errors, unexpected exceptions
  • Info: Successful operations, important events
Check application logs for detailed error information including stack traces for 500 errors.