Skip to main content

provider_error

Function provider_error 

Source
pub fn provider_error(status: u16, body: &str) -> SourceError
Expand description

Build the error for a non-success HTTP response from a ticket provider.

SourceError::Backend is documented as “carrying the provider’s message”, but every connector reached it through reqwest’s error_for_status(), which discards the response body — so the message was reqwest’s generic “HTTP status client error … for url …” and the provider’s actual reason was thrown away. That reason is the whole value: an expired token, a missing scope, a malformed query, a rate-limit window with a retry hint (#240).

Shared here, rather than per connector, so five providers cannot drift into five ways of describing the same failure.