Skip to main content

status_error

Function status_error 

Source
pub async fn status_error(resp: Response) -> FaucetError
Expand description

The error for a non-2xx response: FaucetError::RateLimited for a 429 (or a 503 with Retry-After) that states its wait, otherwise FaucetError::HttpStatus with the body truncated to DEFAULT_ERROR_BODY_MAX_LEN bytes and the URL without credentials. Consumes the response.