Prismic API HTTP Status Codes and Errors Explained

Error Code Exact Meaning Likely Cause Likely Fix
000 000 indicates that the viewer closed the connection before the server could respond to the request. If the viewer closes the connection after the server starts to send the response, this field contains the HTTP status code of the response that the server started to send. - User application didn’t wait long enough for response killed request - Check the retries in your application
200 200 OK success status response code indicates that the request has succeeded. A 200 response is cacheable by default. - You’re a great dev - A cup of coffee as a reward
400 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing). - Document doesn’t exist - No published docs of Type - Link Resolver error - Invalid filter syntax - Ref not provided (ignored) Check the causes list
401 401 Unauthorized response status code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource. - Missing access token for repository endpoint - Incorrect access token for repository endpoint Confirm the access token in your repo settings - Check you’re accessing your .env file correctly
403 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it. - Missing access token for query endpoint - Incorrect access token for query endpoint - Using POST requests in the GraphQL API - Confirm the access token in your repo settings - Check you’re accessing your .env file correctly - Use GET requests with GraphQL
404 404 Not Found response status code indicates that the server cannot find the requested resource. Links that lead to a 404 page are often called broken or dead links and can be subject to Link rot - Wikipedia. - Incorrect repository name (this response has an empty body) - Ref does not exist - Missing asset - Confirm the repository name you’re querying in your project - Make sure you’re not caching the Ref - If Next.js check the .next cache is being invalidated
410 410 Gone client error response code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. - Ref is expired - Make sure you’re not caching the Ref - If Next.js check the .next cache is being invalidated
414 414 URI Too Long response status code indicates that the URI requested by the client is longer than the server is willing to interpret. - Request URLs to the Rest API are limited to 2048 characters. - A client has improperly converted a POST - HTTP | MDN request to a GET - HTTP | MDN request with long query information, - The client has descended into a loop of redirection (for example, a redirected URI prefix that points to a suffix of itself), - Remove all whitespace from GraphQL/GraphQuery requests - You can reduce your string length by using line breaks with no spaces or tabs, or you can use a Remove All Whitespace from Text – Online Text Tools. - Break your request up into smaller queries
422 422 Unprocessable Content response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions. - 422 can mean the response size is bigger the 6MB limit - Think about your data structure and make smaller documents - Switch to the new page builder which is more efficient with compressing data
429 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting"). - User is hitting the new rate limits - Exceeded the maximum number of requests per second - Update to latest development kits
500 5XX Internal Error - Internal Error - Contact support - Please provide request ID, plus timestamps and timezone so we can find your error in our logs.
504 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request. - Internal server error - Client side application not waiting long enough - Check the retries in your application - Contact support - Please provide request ID, plus timestamps and timezone so we can find your error in our logs.
2 Likes