Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
fix: respond with response data if structure doesn't match (#190)
Browse files Browse the repository at this point in the history
This will give us a better idea of what we're actually getting
back, so I can start to investigate why it doesn't match what
I got back on my local instance.
  • Loading branch information
Naomi authored Apr 14, 2024
1 parent 9790f9e commit 7f48f45
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/contexts/productBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ export const productBoard: Context = {
}),
});
const res = (await req.json()) as { links: { html: string } };
if (!res.links) {
await interaction.editReply({
content:
"Unexpected response format:\n```json\n" +
JSON.stringify(res, null, 2) +
"\n```",
});
return;
}
await interaction.editReply({
content: `[Note created](<${res.links.html}>)`,
});
Expand Down

0 comments on commit 7f48f45

Please sign in to comment.