Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix useless log generation
  • Loading branch information
regalijan committed Mar 26, 2024
1 parent 690d92e commit a2fcffc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions functions/api/reports/complete.ts
Expand Up @@ -94,10 +94,8 @@ export async function onRequestPost(context: RequestContext) {
if (p.status === "rejected")
console.log(`Request to coconut failed: ${p}`);
else {
if (!p.value?.ok)
console.log(
`Request rejected by coconut: ${await (p.value as Response).text()}`,
);
if (p.value && !p.value.ok)
console.log(`Request rejected by coconut: ${await p.value.text()}`);
}
}

Expand Down

0 comments on commit a2fcffc

Please sign in to comment.