# Troubleshooting

This document shows common issues and how to solve them

Find solutions to common API issues, such as missing permissions, incomplete query results, slow queries, and too many requests.

## Can't access part of the functionality

This might be a [permissions](https://hygraph.com/docs/getting-started/access-and-permissions/content-api-permissions) issue.

Take into consideration that while Management API permissions are global, content permissions are environment specific.

If you're getting a [401 error](https://hygraph.com/docs/api-reference/basics/errors#401-unauthorized), the endpoint you requested requires a valid [Permanent Auth Token](https://hygraph.com/docs/api-reference/basics/authorization#permanent-auth-tokens), or a environment may not exist for this project.

## Queries not returning complete results

This is a [pagination](https://hygraph.com/docs/api-reference/content-api/pagination) issue.

The default size of results returned by queries fetching multiple entries is 10. You can provide a maximum of 100 to the first, or last arguments.

The limit of 10/100 applies to projects created after 14-06-2022. Projects created before that date have a limit of 100/1000.

Our pagination document also contains information about [pagination limits](https://hygraph.com/docs/api-reference/content-api/pagination#pagination-limits), [nested pagination](https://hygraph.com/docs/api-reference/content-api/pagination#nested-pagination), and [relay cursor connections](https://hygraph.com/docs/api-reference/content-api/pagination#relay-cursor-connections).

## My query is too slow

This could be a [query complexity issue](https://hygraph.com/docs/api-reference/basics/query-complexity). Our document on [splitting GraphQL queries](https://hygraph.com/docs/api-reference/basics/query-complexity#splitting-gql-queries) in order to reduce their complexity, suggests three possible solutions:

- [Limiting query depth](https://hygraph.com/docs/api-reference/basics/query-complexity#example-1-limiting-query-depth)
- [Fetching only necessary fields](https://hygraph.com/docs/api-reference/basics/query-complexity#example-2-fetching-only-necessary-fields)
- [Using pagination](https://hygraph.com/docs/api-reference/basics/query-complexity#example-3-using-pagination)

The document also contains information on [union query optimization](https://hygraph.com/docs/api-reference/basics/query-complexity#union-queries), and on [how to use the complexity tree JSON output to calculate the cost of your queries](https://hygraph.com/docs/api-reference/basics/query-complexity#complexity-tree-json-output).

## No invite found with this code

If when accepting an invitation to a project you get the error message `No invite found with this code`, ensure you are logged in with the right account.

## Too many requests

This is related to our [API limits](https://hygraph.com/docs/api-reference/basics/api-limits). When you exceed them, you get a [429 error](https://hygraph.com/docs/api-reference/basics/errors#429-too-many-requests).

Our API limits document contains information on how to tackle this using [Next.js](https://hygraph.com/docs/api-reference/basics/api-limits#nextjs), [Gatsby](https://hygraph.com/docs/api-reference/basics/api-limits#gatsby), and [Nuxt](https://hygraph.com/docs/api-reference/basics/api-limits#nuxt).

**Note:**

The API limits depend on the current load of the shared region and the subscription plan. These limits can be lifted on dedicated clusters and enterprise plans. You can [contact sales](https://hygraph.com/contact) to request a custom plan.

## (Free plans only) Asset traffic limit reached

As soon as a project on a **free plan** exceeds its asset traffic limit, all asset URLs return the following error:
“You have exceeded the asset traffic limits of your project's subscription. To continue serving assets, please enable billing under your project’s settings to allow for overlimit billing.”

You can either:

- Wait until the limit resets to 0 at the start of the next billing cycle. Once the new cycle begins, you can start querying your assets.
- Upgrade to a paid plan, which immediately resets the limit to 0. In this case, reach out to Hygraph Support so we can verify that the project has been unblocked.
