---
schema_version: "1"
id: 147b6cce15473a49252a9c67f93b6c02e17ea606590438bf8c4db23ba48445ec
title: Error Handling
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/bot-api/einstein-bot/guides/api/error-handling.md
canonical_url: https://developer.salesforce.com/docs/service/einstein-bot-api/guide/error-handling.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 99fa80ef87815021cd0f11b23076d5fbde323d52c8ad5f58f5adad235ad8b4bd
products:
  - Einstein Bots API and SDK
  - Enstein Bot API and SDK
---
# Error Handling

The Einstein Bots API can return the following error responses.

## 4XX Responses

- `BadRequestError`: Sent anytime a request contains an unexpected parameter (for example, a path parameter or a payload parameter).
- `UnauthorizedError`: Sent anytime there’s a generic auth issue with the request. Fix the auth issue and resend the request.
- `ForbiddenError`: Sent anytime there’s an authorization issue with the request (that is, the request has unexpected scopes). Ensure the corresponding OAuth connected app has the proper scopes and resend the request.
- `NotFoundError`: Sent anytime there’s a generic resource issue, such as when the wrong bot ID, org ID, or session was provided in the request.
- `NotAvailableError`: Sent anytime the internal session ID sent in the request payload is invalid.
- `RichContentCapabilitiesMissingException`: Sent when the bot tries to send a File element and the client didn’t set `richContentCapabilities` in the initial request to begin the session. Available in v5.0 only.
- `ServerBusyError`: Sent anytime the server is already processing a request for a given session ID. Retry the request after a response is received for any ongoing request or after 30 seconds.
- `TooManyRequestsError`: Sent when the number of requests for an org or session exceeds the limit.

## 5XX Responses

- `ServiceUnavailableError`: Sent anytime the server is executing a request and runs into an error or exception condition.
