use Response;
use crate;
/// Convert non-2xx responses into a structured error that includes the server body.
///
/// If the status is successful (2xx), the original response is returned.
/// If the status is an error (4xx or 5xx), the response body is consumed
/// to create a `PubkyError::Request(RequestError::Server)` and returned as an `Err`.
pub async