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 ac9b6bc commit 82d8246Copy full SHA for 82d8246
packages/botkit/src/pages.tsx
@@ -443,7 +443,7 @@ app.post("/follow", async (c) => {
443
444
try {
445
if (!followerHandle) {
446
- throw new Error("No followerHandle!");
+ return c.json({ error: "Follower handle is required." }, 400);
447
}
448
449
if (followerHandle.startsWith("@")) {
@@ -473,10 +473,7 @@ app.post("/follow", async (c) => {
473
return c.json({
474
error: "No follow link found in WebFinger data.",
475
}, 400);
476
- } catch (error) {
477
- if (error instanceof Error && error.message === "No followerHandle!") {
478
- return c.json({ error: "Follower handle is required." }, 400);
479
- }
+ } catch (_error) {
480
return c.json({ error: "An internal server error occurred." }, 500);
481
482
});
0 commit comments