Error messages
This document describes error messages that you might encounter when working with BigQuery, including HTTP error codes and suggested troubleshooting steps.
For more information about query errors, see Troubleshoot query errors.
For more information about streaming insert errors, see Troubleshoot streaming inserts.
Error table
Responses from the BigQuery API include an HTTP error code and an error object in the response body. An error object is typically one of the following:
- An
errorsobject, which contains an array ofErrorProtoobjects. - An
errorResultsobject, which contains a singleErrorProtoobject.
The Error message column in the following table maps to the reason property
in an ErrorProto object.
The table does not include all possible HTTP errors or other networking errors. Therefore, don't assume that an error object is present in every error response from BigQuery. In addition, you might receive different errors or error objects if you use the Cloud Client Libraries for the BigQuery API. For more information, see BigQuery API Client Libraries.
If you receive an HTTP response code that doesn't appear in the following table,
the response code indicates an issue or an expected result with the HTTP
request. Response codes in the 5xx range indicate a server-side error. If you
receive a 5xx response code, then retry the request later. In some cases, a
5xx response code might be returned by an intermediate server such as a
proxy. Examine the response body and response headers for details about the
error. For a full list of HTTP response codes, see HTTP response
codes.
If you use the bq command-line tool to check job status,
the error object is not returned by default. To view the error object and the
corresponding reason property that maps to the following table, use the
--format=prettyjson flag. For example, bq --format=prettyjson show -j
*<job id>*. To view verbose logging for the bq tool, use
--apilog=stdout. To learn more about troubleshooting the bq tool,
see Debugging.
| Error message | HTTP code | Description | Troubleshooting |
|---|---|---|---|
| accessDenied | 403 |
This error returns when you try to access a resource such as a dataset, table, view, or job that you don't have access to. This error also returns when you try to modify a read-only object. |
Contact the resource owner and
request access to the resource for
the user identified by the |
| attributeError | 400 |
This error returns when there is an issue with the user code where a certain object attribute is called but does not exist. |
Ensure that the object you are working with has the attribute you are trying to access. For more information on this error, see AttributeError. |
| backendError | 500, 502, 503 or 504 |
This error indicates that the service is currently unavailable. This can
happen due to a number of transient issues, including:
|
5xx errors are service-side issues and the client has no way to fix or
control them. From the client side, in order to mitigate the impact of 5xx
errors, you need to retry your requests using
truncated
exponential backoffs. For more information about exponential backoffs,
see
Exponential
backoff. However, there are two special cases for troubleshooting this
error:
If the retries are not effective and the issues persist, you can
calculate the rate of failing
requests and
contact support. |
| badRequest | 400 |
The error |
Wait a few minutes and try again, or filter your statement to only operate
on older data that is outside of the streaming buffer. To see if data is
available for table DML operations, check the
Alternatively, consider streaming data with the BigQuery Storage Write API (gRPC), which doesn't have this limitation. |
| billingNotEnabled | 403 |
This error returns when billing isn't enabled for the project. |
Enable billing for the project in the Google Cloud console. |
| billingTierLimitExceeded | 400 |
This error returns when the value of
|
This error most often results from executing inefficient cross-joins, either explicitly or implicitly, for example due to an inexact join condition. These types of queries are not suitable for on-demand pricing due to high resource consumption, and in general they may not scale well. You can either optimize the query or switch to use the capacity-based (slots) pricing model to resolve this error. For information about optimizing queries, see Avoiding SQL anti-patterns. |
| blocked | 403 |
This error returns when BigQuery has temporarily denylisted the operation you attempted to perform, usually to prevent a service outage. |
Contact support for more information. |
| duplicate | 409 |
This error returns when trying to create a job, dataset, or table that
already exists. The error also returns when a job's
|
Rename the resource you're trying to create, or change the
|
| internalError | 500 |
This error returns when an internal error occurs within BigQuery. |
Wait according to the back-off requirements described in the BigQuery Service Level Agreement, then try the operation again. If the error continues to occur, contact support or file a bug using the BigQuery issue tracker. You can also reduce the frequency of this error by using Reservations. |
| invalid | 400 |
This error returns when there is any type of invalid input other than an
invalid query, such as missing required fields or an invalid table schema.
Invalid queries return an |
|
| invalidQuery | 400 |
This error returns when you attempt to run an invalid query. |
Check your query for syntax errors. The query reference contains descriptions and examples of how to construct valid queries. |
| invalidUser | 400 |
This error returns when you attempt to schedule a query with invalid user credentials. |
Refresh the user credentials, as explained in Scheduling queries. |
| jobBackendError | 400 |
This error returns when the job was created successfully, but failed with
an internal error. You might see this error in |
Retry the job with a new |
| jobInternalError | 400 |
This error returns when the job was created successfully, but failed with
an internal error. You might see this error in |
Retry the job with a new |
| jobRateLimitExceeded | 400 |