Add new test based on token auth
This commit is contained in:
7
src/base/err_utils.rs
Normal file
7
src/base/err_utils.rs
Normal file
@ -0,0 +1,7 @@
|
||||
use std::error::Error;
|
||||
use std::io::ErrorKind;
|
||||
|
||||
/// Encapsulate errors in [`std::io::Error`] with a message
|
||||
pub fn encpasulate_error<E: Error>(e: E, msg: &str) -> std::io::Error {
|
||||
std::io::Error::new(ErrorKind::Other, format!("{}: {}", msg, e))
|
||||
}
|
Reference in New Issue
Block a user