Merge pull request #3991 from continuedev/dallin/hhtp-code-errors

Handle stream errors with messages of format HTTP CODE
This commit is contained in:
Dallin Romney 2025-02-07 10:20:03 -08:00 • committed by GitHub
commit ea561861b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)) {