Skip to content

Commit

Permalink
return 404 for missing amount instead of Error which uses 5xx
Browse files Browse the repository at this point in the history
  • Loading branch information
frnandu committed Sep 27, 2024
1 parent c74c8bf commit 598c0f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lnurlp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ lnurlApp.get("/:username/callback", async (c) => {
// TODO: store data (e.g. for zaps)

if (!amount) {
throw new Error("No amount provided");
return c.text('No amount provided', 404);
}

const connectionSecret = await findWalletConnection(username);
Expand Down

0 comments on commit 598c0f3

Please sign in to comment.