check for HTTP at beginning of error message
This commit is contained in:
parent
f29e1849f3
commit
f2c6c9f4cb
1 changed files with 2 additions and 1 deletions
|
|
@ -51,7 +51,8 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
|
|||
typeof error["message"] === "string"
|
||||
) {
|
||||
message = error["message"];
|
||||
const status = message?.split(" ")[0];
|
||||
const parts = message?.split(" ") ?? [];
|
||||
const status = parts[0] === "HTTP" ? parts[1] : parts[0];
|
||||
if (status) {
|
||||
const code = Number(status);
|
||||
if (!Number.isNaN(statusCode)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue