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.status = response.status;
|
||||||
error.statusText = response.statusText;
|
error.statusText = `${response.status} ${response.statusText}`;
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const errorBody = await response.text();
|
const errorBody = await response.text();
|
||||||
|
|
|
||||||
|
|
@ -398,7 +398,7 @@ const ErrorDetails = (props: { details: ApiErrorDetails | null | undefined }) =>
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return <>
|
return <>
|
||||||
<p>{details.status && <strong>{details.status} {details.statusText}</strong>}</p>
|
{details.statusText && <p><strong>{details.statusText}</strong></p>}
|
||||||
<pre>{details.text}</pre>
|
<pre>{details.text}</pre>
|
||||||
</>
|
</>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rqbit-desktop"
|
name = "rqbit-desktop"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
description = "A Tauri App"
|
description = "rqbit torrent client"
|
||||||
authors = ["you"]
|
authors = ["you"]
|
||||||
license = ""
|
license = ""
|
||||||
repository = ""
|
repository = ""
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
"fullscreen": false,
|
"fullscreen": false,
|
||||||
"resizable": true,
|
"resizable": true,
|
||||||
"title": "rqbit",
|
"title": "rqbit",
|
||||||
"width": 800,
|
"width": 992,
|
||||||
"height": 600
|
"height": 600
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue