Skip to main content

Error

Type Alias Error 

Source
pub type Error = FinanceError;
Expand description

Type alias for Error (for consistency with common Rust patterns)

Aliased Type§

pub enum Error {
Show 17 variants AuthenticationFailed { context: String, }, SymbolNotFound { symbol: Option<String>, context: String, }, RateLimited { retry_after: Option<u64>, }, HttpError(Error), JsonParseError(Error), ResponseStructureError { field: String, context: String, }, InvalidParameter { param: String, reason: String, }, Timeout { timeout_ms: u64, }, ServerError { status: u16, context: String, }, UnexpectedResponse(String), InternalError(String), ApiError(String), RuntimeError(Error), IndicatorError(IndicatorError), ExternalApiError { api: String, status: u16, }, MacroDataError { provider: String, context: String, }, FeedParseError { url: String, context: String, },
}

Variants§

§

AuthenticationFailed

Authentication failed (Yahoo Finance, SEC EDGAR, etc.)

Fields

§context: String

Error context

§

SymbolNotFound

The requested symbol was not found

Fields

§symbol: Option<String>

The symbol that was not found

§context: String

Additional context

§

RateLimited

Rate limit exceeded

Fields

§retry_after: Option<u64>

Seconds until retry is allowed

§

HttpError(Error)

HTTP request error

§

JsonParseError(Error)

Failed to parse JSON response

§

ResponseStructureError

Response structure error - missing or malformed fields

Fields

§field: String

Field name that caused the error

§context: String

Error context

§

InvalidParameter

Invalid parameter provided

Fields

§param: String

Parameter name

§reason: String

Reason for invalidity

§

Timeout

Network timeout

Fields

§timeout_ms: u64

Timeout duration in milliseconds

§

ServerError

Server error (5xx status codes)

Fields

§status: u16

HTTP status code

§context: String

Error context

§

UnexpectedResponse(String)

Unexpected API response

§

InternalError(String)

Internal error

§

ApiError(String)

General API error

§

RuntimeError(Error)

Tokio runtime error

§

IndicatorError(IndicatorError)

Indicator calculation error

§

ExternalApiError

Error from an external (non-Yahoo) data API

Fields

§api: String

Name of the external API (e.g., “alternative.me”, “coingecko”)

§status: u16

HTTP status code returned

§

MacroDataError

Error fetching or parsing macro-economic data (FRED, Treasury, BLS)

Fields

§provider: String

Provider name (e.g., “FRED”, “US Treasury”)

§context: String

Error context

§

FeedParseError

Error parsing an RSS/Atom feed

Fields

§url: String

Feed URL that failed

§context: String

Error context