ReadonlykindAlways 'ChatCreationFailed'. Branch on it to tell this failure from the other SDK errors.
Optional ReadonlyoriginalThe error or value that caused this one, when the SDK was wrapping something else.
For a NetworkError this is the browser's own fetch rejection. It is not
serialized as-is: toJson() takes only an Error cause's
message.
Serializes the error into the JSON-safe ErrorJson payload for logging or reporting.
The payload always carries kind and the message. The cause's message
is added only when originalError is an Error and says
something the message does not, truncated to 256 characters; any other cause is dropped.
Subclasses extend the payload with the fields listed on their own pages.
The error as plain, JSON-serializable data.
A chat could not be created for the session.
chat() creates a chat on the first message when the session does not have one yet; this error is thrown when that call comes back without one, so it rejects the promise
chat()returned and the user's message is not sent. It is not delivered to onError — catch it aroundchat(). A failing request surfaces as HttpError or NetworkError instead; this error is the case where the request succeeded but produced no chat.The message names the ChatMode in effect and whether a persistent chat was asked for, for example
Failed to create persistent chat, mode: Functional. kind is'ChatCreationFailed'.