Don't display status code twice in UI errors
This commit is contained in:
parent
1947da3f26
commit
63a21a50fd
4 changed files with 4 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ const makeRequest = async (method: string, path: string, data?: any): Promise<an
|
|||
}
|
||||
|
||||
error.status = response.status;
|
||||
error.statusText = response.statusText;
|
||||
error.statusText = `${response.status} ${response.statusText}`;
|
||||
|
||||
if (!response.ok) {
|
||||
const errorBody = await response.text();
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ const ErrorDetails = (props: { details: ApiErrorDetails | null | undefined }) =>
|
|||
return null;
|
||||
}
|
||||
return <>
|
||||
<p>{details.status && <strong>{details.status} {details.statusText}</strong>}</p>
|
||||
{details.statusText && <p><strong>{details.statusText}</strong></p>}
|
||||
<pre>{details.text}</pre>
|
||||
</>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "rqbit-desktop"
|
||||
version = "0.0.0"
|
||||
description = "A Tauri App"
|
||||
description = "rqbit torrent client"
|
||||
authors = ["you"]
|
||||
license = ""
|
||||
repository = ""
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
"fullscreen": false,
|
||||
"resizable": true,
|
||||
"title": "rqbit",
|
||||
"width": 800,
|
||||
"width": 992,
|
||||
"height": 600
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue