Categories

API Error 404: Not Found

An HTTP 404: Not Found error is returned by the API when a requested resource can not be found.
Last updated
July 7, 2023

An HTTP 404: Not Found error is returned by the API when a requested resource can not be found. This can happen for one of several reasons:

  • You are attempting to hit an endpoint that does not exist (like https://api.bonsai.io/covfefe).
  • You are attempting to access some information that is not available to your account.

Example

An HTTP 404: Not Found error may look something like this:

<div class="code-snippet-container">
<a fs-copyclip-element="click-2" href="#" class="btn w-button code-copy-button" title="Copy">
<img class="copy-image" src="https://global-uploads.webflow.com/63c81e4decde60c281417feb/6483934eeefb356710a1d2e9_icon-copy.svg" loading="lazy" alt="">
<img class="copied-image" src="https://assets-global.website-files.com/63c81e4decde60c281417feb/64839e207c2860eb9e6aa572_icon-copied.svg" loading="lazy" alt="">
</a>
<div class="code-snippet">
<pre><code fs-codehighlight-element="code" fs-copyclip-element="copy-this-2" class="hljs language-javascript">{  "errors": [    "Cluster doesnotexist-1234 not found.",    "Please review the documentation available at https://docs.bonsai.io",    "Undefined request."  ],  "status": 404}</code></pre>
</div>
</div>

The <span class="inline-code"><pre><code>"status": 404</code></pre></span> key confirms the error is an HTTP 404: Not Found error.

Troubleshooting

The first thing to look at when troubleshooting an HTTP 404: Not Found error is the error message array which is returned from the API. Also make sure to check for any typos that may have ended up in the request.

If you're still unsure why you are receiving the error, then please shoot us an email.

View code snippet
Close code snippet