Error Handling

The Einstein Bots API can return the following error 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.
  • ServiceUnavailableError: Sent anytime the server is executing a request and runs into an error or exception condition.