Module error

Module error 

Source
Expand description

This module defines the error types for the OpenAI API client. It includes a comprehensive OpenAIError enum that covers various error scenarios, such as API errors, network issues, and serialization failures.

Modules§

exposed
Exposed namespace of the module.
orphan
Orphan namespace of the module.
own
Own namespace of the module.
prelude
Prelude to use essentials: use my_module ::prelude :: *.

Structs§

ApiError
Represents an error returned by the OpenAI API. Corresponds to the Error schema in the OpenAPI spec.
ApiErrorWrap
A wrapper for ApiError that includes the HTTP status code.

Enums§

OpenAIError
Represents all possible errors that can occur when interacting with the OpenAI API.

Functions§

map_deserialization_error
Helper function to map serde_json::Error to OpenAIError::Internal.

Type Aliases§

Result
Type alias for Results using error_tools pattern