fix: half missing logging
This commit is contained in:
+3
-1
@@ -60,13 +60,15 @@ export function webhookMerger(app: App) {
|
|||||||
|
|
||||||
state.timer = setTimeout(async () => {
|
state.timer = setTimeout(async () => {
|
||||||
try {
|
try {
|
||||||
await fetch(url, {
|
const res = await fetch(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
},
|
},
|
||||||
body: JSON.stringify(state.data),
|
body: JSON.stringify(state.data),
|
||||||
});
|
});
|
||||||
|
if (!res.ok)
|
||||||
|
log.warn`Could not forward webhook: ${res.status}\n${await res.json().catch(() => res.text())}`;
|
||||||
} finally {
|
} finally {
|
||||||
pending.delete(id);
|
pending.delete(id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user