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,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,7 +401,6 @@ const ErrorDetails = (props: { details: ApiErrorDetails | null | undefined }) =>
|
|||
{details.statusText && <p><strong>{details.statusText}</strong></p>}
|
||||
<pre>{details.text}</pre>
|
||||
</>
|
||||
|
||||
}
|
||||
|
||||
const ErrorComponent = (props: { error: Error | null, remove?: () => void }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue