We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5560c56 commit a363e26Copy full SHA for a363e26
src/app.ts
@@ -83,10 +83,11 @@ async function init() {
83
84
init().catch((err) => errors.push(err));
85
86
+const BAD_REQUEST = 400;
87
const server = Http.createServer(async (_req, res) => {
88
if (_req.url?.startsWith('/githubWebhook')) {
89
const chunks = [];
- for await (let chunk of _req) {
90
+ for await (const chunk of _req) {
91
chunks.push(chunk);
92
}
93
@@ -99,7 +100,7 @@ const server = Http.createServer(async (_req, res) => {
99
100
res.end();
101
} catch (error) {
102
console.log(error);
- res.statusCode = 400;
103
+ res.statusCode = BAD_REQUEST;
104
105
106
0 commit comments