Skip to main content
This reference documents all error codes returned by the Fanfare SDK, their meanings, and recommended resolutions.

Error Structure

All SDK errors follow a consistent structure:

Handling Errors

Network Errors

NETWORK_ERROR

Description: Request failed due to network connectivity issues. Common Causes:
  • No internet connection
  • DNS resolution failure
  • Network timeout
  • Server unreachable
Resolution:
Retryable: Yes

TIMEOUT

Description: Request timed out waiting for a response. Common Causes:
  • Slow network connection
  • Server under heavy load
  • Request too large
Resolution:
Retryable: Yes

ABORTED

Description: Request was cancelled before completion. Common Causes:
  • User navigated away from page
  • Component unmounted
  • Explicit cancellation
Resolution: This is usually intentional and doesn’t require action. Retryable: No

Authentication Errors

UNAUTHORIZED

Description: Request requires authentication. HTTP Status: 401 Common Causes:
  • No session active
  • Session was cleared
  • Invalid credentials
Resolution:
Retryable: No (requires re-authentication)

SESSION_EXPIRED

Description: Authentication session has expired. HTTP Status: 401 Common Causes:
  • Session timeout
  • Server-side session invalidation
  • Token expiration
Resolution:
Retryable: Yes (after refresh)

INVALID_CREDENTIALS

Description: Provided credentials are incorrect. HTTP Status: 401 Common Causes:
  • Wrong email/password combination
  • Account doesn’t exist
  • Account locked
Resolution: Prompt user to verify their credentials. Retryable: No

INVALID_OTP

Description: One-time password verification failed. HTTP Status: 401 Common Causes:
  • Incorrect code entered
  • Code has expired
  • Code already used
Resolution:
Retryable: No (user must enter correct code)

Queue Errors

QUEUE_NOT_FOUND

Description: The specified queue does not exist. Common Causes:
  • Invalid queue ID
  • Queue has been deleted
  • Queue not yet created
Resolution: Verify the queue ID and ensure the experience is active. Retryable: No

QUEUE_EXPIRED

Description: The queue has ended and is no longer accepting entries. Common Causes:
  • Queue end time has passed
  • Queue was manually closed
  • All inventory distributed
Resolution:
Retryable: No

QUEUE_FULL

Description: The queue has reached maximum capacity. Common Causes:
  • Queue participant limit reached
  • High demand exceeded capacity
Resolution:
Retryable: No

ALREADY_IN_QUEUE

Description: User is already in this queue. Common Causes:
  • Duplicate entry attempt
  • Re-entry after page refresh
Resolution: This is informational. Retrieve the existing queue status.
Retryable: No (not an error condition)

NOT_IN_QUEUE

Description: User is not in the specified queue. Common Causes:
  • Never entered the queue
  • Left the queue previously
  • Session mismatch
Resolution: Re-enter the queue if appropriate. Retryable: No

Validation Errors

VALIDATION_ERROR

Description: Request data failed validation. HTTP Status: 400 or 422 Common Causes:
  • Missing required fields
  • Invalid field values
  • Data format issues
Resolution:
Retryable: No (requires valid data)

INVALID_PARAMETERS

Description: Request parameters are invalid. HTTP Status: 400 Common Causes:
  • Invalid ID format
  • Out-of-range values
  • Unsupported parameters
Resolution: Verify the parameters being sent. Retryable: No

Rate Limiting

RATE_LIMITED

Description: Too many requests in a short period. HTTP Status: 429 Headers:
  • X-RateLimit-Limit: Maximum requests allowed
  • X-RateLimit-Remaining: Requests remaining
  • Retry-After: Seconds to wait before retrying
Resolution:
Retryable: Yes (after delay)

Server Errors

INTERNAL_ERROR

Description: An unexpected server error occurred. HTTP Status: 500 Resolution:
Retryable: Yes (with backoff)

SERVICE_UNAVAILABLE

Description: The service is temporarily unavailable. HTTP Status: 503 Common Causes:
  • Maintenance window
  • Capacity issues
  • Deployment in progress
Resolution:
Retryable: Yes (with backoff)

SDK Configuration Errors

NOT_INITIALIZED

Description: SDK operation called before initialization. Common Causes:
  • Calling methods before creating client
  • Client creation failed
  • Async initialization not awaited
Resolution:
Retryable: No

ALREADY_INITIALIZED

Description: Attempted to initialize SDK when already initialized. Resolution: Use a single client instance throughout your application. Retryable: No

INVALID_CONFIG

Description: SDK configuration is invalid. Common Causes:
  • Missing required configuration
  • Invalid configuration values
  • Incompatible options
Resolution: Review your SDK configuration. Retryable: No

Session Integrity Errors

Some actions require a current, valid SDK session before the consumer can continue. Description: Session integrity validation failed. HTTP Status: 403 Resolution: Confirm that the SDK is initialized once, the consumer session is current, and the request is retried from the active browser context. User Message: “We could not complete this action. Please refresh the page and try again.”

Best Practices

Error Logging

Log errors with context for debugging.

User-Friendly Messages

Map technical errors to user-friendly messages.