mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-13 19:32:36 +02:00
Retry request from reverseproxy retry options
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use std::error::Error;
|
||||
use std::fmt::{Display, Formatter, Result};
|
||||
use crate::utils::sanitize_sensitive_info;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! get_errors_notify_message {
|
||||
@@ -94,10 +95,8 @@ macro_rules! handle_tuliprox_error_result {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub use handle_tuliprox_error_result;
|
||||
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub enum TuliproxErrorKind {
|
||||
// do not send with messaging
|
||||
@@ -128,12 +127,12 @@ impl Error for TuliproxError {}
|
||||
pub fn to_io_error<E>(err: E) -> std::io::Error
|
||||
where
|
||||
E: std::error::Error,
|
||||
{ std::io::Error::other(err.to_string()) }
|
||||
{ std::io::Error::other(sanitize_sensitive_info(&err.to_string())) }
|
||||
|
||||
pub fn str_to_io_error(err: &str) -> std::io::Error {
|
||||
std::io::Error::other(err.to_string())
|
||||
std::io::Error::other(sanitize_sensitive_info(err))
|
||||
}
|
||||
|
||||
pub fn string_to_io_error(err: String) -> std::io::Error {
|
||||
std::io::Error::other(err)
|
||||
std::io::Error::other(sanitize_sensitive_info(&err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user