Objects
ChatEventError
An error after the stream has started. The stream ends without done, and the question is not saved to the log. When the server instance stops for an update (code = server_restart, retry: true), the answer is marked as canceled and is not generated again, so you can send the same request again unchanged.
Fields
type"error"requiredmessagestringrequiredretrybooleantruemeans the answer did not complete because of the server (the instance stopped for an update,code=server_restart), and you can repeat the request unchanged. Absent for other codes.answer_idstringID of the answer object, if the answer was already created.
detailsobjectDetails. For
sources_inaccessibleandout_of_scope:hidden(the number of unavailable sources),can_request(you can request access withPOST /v1/access-requestsandanswer_id),reason(the same as the event field), and forout_of_scopealsocollections(a list ofCollectionRefwhere the answer exists). Forassistant.unavailablewhen the assistant is busy (reasonrate_limited):retry_after, the pause before a retry in seconds, as in429 answers.engine_busybefore the stream starts.detailsdoes not include a previous code of the error.Fields
hiddenintegercan_requestbooleanreasonstringcollectionsarray of CollectionRefretry_afterinteger
reasonstringReason code for a message in the interface language (extensible, a free-form string). Assistant error codes:
timeout,rate_limited,upstream_unavailable,license_blocked,license_restricted,forbidden,canceled,internal,bad_request,conflict,not_found,too_large,unprocessable,not_implemented,server_restart. Sursa codes:engine_unavailable(the assistant is unavailable),engine_closed(the assistant's stream closed without a result),sources_inaccessible,server_restart(the Sursa instance stopped for an update),sources_unavailable(hidden because of deleted or archived sources),out_of_scope(sources exist only outside the selected collection),superseded(withcanceled: the answer was replaced by a retry with the samerequest_id), andawaiting_classification(hidden because the document is still being processed: its access category is not determined yet, the answer becomes available after classification, and access cannot be requested, socan_request=false). Show a message based on the code. For an unknown code, show a generic message based oncode;messageis only a fallback for clients without translations, and its language is not guaranteed.