Merge pull request #3991 from continuedev/dallin/hhtp-code-errors
Handle stream errors with messages of format HTTP CODE
This commit is contained in:
commit
ea561861b8
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