packages feed

openai-1.1.1 / src / OpenAI / V1 / Error.hs

-- | Error informationmodule OpenAI.V1.Error    ( -- * Types      Error(..)    ) whereimport OpenAI.Prelude-- | More information on the cause of the failure.---- NOTE: OpenAPI API's says that the `code` and `message` fields are required,-- but in practice the `Error` record can be present with all fields omitted,-- so they are all marked optional (`Maybe`) heredata Error = Error    { code :: Maybe Text    , message :: Maybe Text    , param :: Maybe Text    , line :: Maybe Natural    } deriving stock (Generic, Show)      deriving anyclass (FromJSON, ToJSON)