# Errors

Requests made to the Bid Manager API that can't be completed return an error
message. Error messages should be parsed and appropriately handled to avoid
future errors. Requests returning errors consume user quota, and error rates
are considered when reviewing requests for additional quota.

An error response has the following format and includes an HTTP response code,
an error message, and a [Google RPC code](https://cloud.google.com/apis/design/errors#handling_errors) status:

```
{
  "error": {
    "code": integer,
    "message": string,
    "status": enum (google.rpc.Code)
  }
}
```

Here's a list of common API errors along with the recommended action to take if
they are returned:

> [!NOTE]
> **Note:** If the error persists even after taking the recommended action, [contact
> support](https://developers.google.com/bid-manager/support/contact) to report the issue.

| Recommended Actions for error code and RPC ||
|---|---|
| `400` `INVALID_ARGUMENT` | There's an issue with your request. Review the message field in the error response, and modify your request accordingly. If you are experiencing issues with finding an acceptable combination of filters, dimensions, and metrics, refer to our [reporting best practices](https://developers.google.com/bid-manager/guides/general/best-practices) for recommendations. |
| `401` `UNAUTHENTICATED` | Your request couldn't be properly authenticated. Verify that you are including valid OAuth credentials in your request. For more information, see the [Get Started guide](https://developers.google.com/bid-manager/guides/get-started/overview). |
| `404` `NOT_FOUND` | The [`Query`](https://developers.google.com/bid-manager/reference/rest/current/queries#Query) or [`Report`](https://developers.google.com/bid-manager/reference/rest/current/queries.reports#Report) you are attempting to run or retrieve cannot be found. Verify the following: - The resource ID is correct - The resource type is valid for the endpoint - The resource in question was [created by the accessing user](https://developers.google.com/bid-manager/guides/general/best-practices#build_new_reports_in_the_ui_first) |
| `429` `RESOURCE_EXHAUSTED` | You have exceeded either your [API request quota](https://developers.google.com/bid-manager/quotas) or [reporting quota](https://developers.google.com/bid-manager/guides/general/best-practices#consider_reporting_quotas). Read the error message to determine what type of quota you are exceeding: - API request quota: Examine your API usage using the [Google Cloud Console](https://console.developers.google.com/project/_/apiui/apiview/doubleclickbidmanager.googleapis.com/metrics), and modify your workflow to operate within the existing quota limits. If your operations can't be completed within your given daily quota, [request additional quota](https://developers.google.com/bid-manager/quotas#additional_quota). - Reporting quota: Review [existing reporting quota best practices](https://developers.google.com/bid-manager/guides/general/best-practices#consider_reporting_quotas) and reach out to [Display \& Video 360 product support](https://support.google.com/displayvideo/contact/nghelp_contact_form) if needed. |
| `500` `INTERNAL` | The API experienced an internal error. Use the [exponential backoff error handling strategy](https://developers.google.com/bid-manager/guides/general/best-practices#exponential_backoff) to wait and retry the request. If the error persists, [contact support](https://developers.google.com/bid-manager/support/contact). |
| `504` `DEADLINE_EXCEEDED` | The API took too long to complete the request. Use the [exponential backoff error handling strategy](https://developers.google.com/bid-manager/guides/general/best-practices#exponential_backoff) to wait and retry the request. If the error persists, [contact support](https://developers.google.com/bid-manager/support/contact). |