refactor(access_token): handle timeout errors gracefully (#1882)

This commit is contained in:
Narayan Bhat
2023-08-08 15:18:23 +05:30
committed by GitHub
parent c205f064b9
commit cc4136f85f
4 changed files with 55 additions and 8 deletions

View File

@ -11,6 +11,8 @@ pub(crate) const ALPHABETS: [char; 62] = [
];
/// API client request timeout (in seconds)
pub const REQUEST_TIME_OUT: u64 = 30;
pub const REQUEST_TIMEOUT_ERROR_CODE: &str = "TIMEOUT";
pub const REQUEST_TIMEOUT_ERROR_MESSAGE: &str = "Connector did not respond in specified time";
///Payment intent fulfillment default timeout (in seconds)
pub const DEFAULT_FULFILLMENT_TIME: i64 = 15 * 60;