Skip to main content
Version: v2.x

Errors

When errors occur while using AiChat, a message will be displayed to the user at the top of the chat area for a few seconds, and the error will be logged to the console.


Error Message Example


Listening to Errors

You can listen to errors by providing an error event handler to the events prop of AiChat.
Refer to error event documentation for more details.


Errors List

Below is a list of errors that can occur while using AiChat.

IdentifierError MessageDescription
failed-to-load-contentFailed to load contentAn error occurred while trying to load content.
failed-to-stream-contentFailed to stream contentAn error occurred while trying to send a message.
failed-to-render-contentFailed to render contentAn error occurred while trying to render a received message.
connection-errorConnection errorAn error occurred while trying to connect to the server.
invalid-credentialsInvalid credentialsThe credentials provided to the adapter are invalid.
invalid-api-keyInvalid API keyThe API key provided to the adapter is invalid.
http-server-side-errorHTTP server side errorAn error occurred on the server side while processing the request.
http-client-side-errorHTTP client side errorAn error occurred on the client side while processing the request.
data‑transfer‑mode‑not‑supportedRequested data transfer mode is not supportedThe data transfer mode set in the dataTransferMode prop is not supported by the adapter.
no‑data‑transfer‑mode‑supportedAdapter does not support any valid data transfer modesThe custom adapter provided by the user does not implement any valid data transfer modes.