Fixed base64 error
This commit is contained in:
parent
63a21a50fd
commit
ca66a70bc1
3 changed files with 6 additions and 5 deletions
|
|
@ -11,10 +11,10 @@ pub struct ApiError {
|
|||
}
|
||||
|
||||
impl ApiError {
|
||||
pub fn new_from_string(status: StatusCode, text: String) -> Self {
|
||||
pub fn new_from_anyhow(status: StatusCode, error: anyhow::Error) -> Self {
|
||||
Self {
|
||||
status: Some(status),
|
||||
kind: ApiErrorKind::Other(anyhow::anyhow!("{}", text)),
|
||||
kind: ApiErrorKind::Other(error),
|
||||
plaintext: false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue