Refactor: Extract new mod error

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-05-06 22:42:35 +10:00
parent 8bda7eadf5
commit d2914cca42
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928
3 changed files with 145 additions and 138 deletions

View file

@ -16,7 +16,9 @@ use percent_encoding::{
use tokio::sync::OnceCell;
mod request;
pub use request::{GhApiContextError, GhApiError, GhGraphQLErrors};
mod error;
pub use error::{GhApiContextError, GhApiError, GhGraphQLErrors};
/// default retry duration if x-ratelimit-reset is not found in response header
const DEFAULT_RETRY_DURATION: Duration = Duration::from_secs(10 * 60);