> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quickreel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Handling

> Handling Errors in the QuickReel API

<Warning>
  All errors follow a standard format to help you quickly identify and resolve
  issues.
</Warning>

### HTTP Status Codes

<CardGroup cols={2}>
  <Card>
    <div className="flex items-center gap-2 mb-4">
      <span>
        <Icon icon="circle-check" size={24} color="#0D9373" />
      </span>

      <h3 className="text-lg font-bold">Success Codes</h3>
    </div>

    <div className="space-y-3">
      <div>
        <div className="font-mono"><span className="text-green-600">200</span> Success</div>
        <div>Request completed successfully</div>
      </div>

      <div>
        <div className="font-mono"><span className="text-green-600">201</span> Created</div>
        <div>Resource created successfully</div>
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex items-center gap-2 mb-4">
      <span>
        <Icon icon="circle-xmark" size={24} color="#DC3545" />
      </span>

      <h3 className="text-lg font-bold">Client Error Codes</h3>
    </div>

    <div className="space-y-3">
      <div>
        <div className="font-mono"><span className="text-red-600">400</span> Bad Request</div>
        <div>Invalid parameters or missing fields</div>
      </div>

      <div>
        <div className="font-mono"><span className="text-red-600">401</span> Unauthorized</div>
        <div>Invalid or missing API key</div>
      </div>

      <div>
        <div className="font-mono"><span className="text-red-600">403</span> Forbidden</div>
        <div>Insufficient permissions</div>
      </div>

      <div>
        <div className="font-mono"><span className="text-red-600">404</span> Not Found</div>
        <div>Resource not found</div>
      </div>

      <div>
        <div className="font-mono"><span className="text-red-600">429</span> Too Many Requests</div>
        <div>Rate limit exceeded</div>
      </div>
    </div>
  </Card>
</CardGroup>

### Example Error Response

<CodeGroup>
  ```json 400 Bad Request theme={null}
  {
    "error": {
      "message": "Must be a valid URL"
    }
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "error": {
      "message": "Invalid API key provided"
    }
  }
  ```

  ```json 429 Rate Limit theme={null}
  {
    "error": {
      "message": "Rate limit exceeded. Please try again in 60 seconds"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": {
      "message": "Project not found."
    }
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "error": {
      "message": "Internal server error"
    }
  }
  ```
</CodeGroup>

### Common Error Scenarios

<AccordionGroup>
  <Accordion title="Authentication Errors" icon="key">
    * Invalid API key - Expired API key - Missing API key - Insufficient
      permissions
  </Accordion>

  {" "}

  <Accordion title="Request Errors" icon="circle-exclamation">
    * Missing required fields - Invalid parameter values - Unsupported file format
    * File size too large
  </Accordion>

  <Accordion title="Rate Limiting" icon="clock">
    * Too many requests - Exceeded daily quota - Exceeded concurrent requests -
      Account usage limits
  </Accordion>
</AccordionGroup>
