Skip to content

Commit

Permalink
chore: improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
svedova committed Apr 19, 2024
1 parent ca1b9b3 commit 61ee2a6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/utils/callbacks/api.ts
Expand Up @@ -75,7 +75,16 @@ export const handleApi = (

return;
} catch (e) {
console.error(e);
if (
e instanceof Error &&
e.message?.includes("handler is not a function")
) {
console.error(
"API Function does not export a default method. See https://www.stormkit.io/docs/features/writing-api for more information."
);
} else {
console.error(e);
}
}
}

Expand Down

0 comments on commit 61ee2a6

Please sign in to comment.