Skip to content

Commit

Permalink
feat: 增加对SSE 4xx/5xx的处理
Browse files Browse the repository at this point in the history
  • Loading branch information
quanyc committed May 8, 2023
1 parent de973c2 commit 828c776
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ app.all(`*`, async (req, res) => {
parser.feed(str);
}
}
}else
{
const body = await response.text();
res.status(response.status).send(body);
}

}else
Expand Down
4 changes: 4 additions & 0 deletions docker/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ app.all(`*`, async (req, res) => {
parser.feed(str);
}
}
}else
{
const body = await response.text();
res.status(response.status).send(body);
}

}else
Expand Down

0 comments on commit 828c776

Please sign in to comment.