Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Add messaging around source_file (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
shapirone authored Apr 15, 2022
1 parent 90a9c6b commit 6841c6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export const createFunctions = async (options: Options, manifest: any) => {
throw new Error(`Could not find file: ${fnFilePath}`);
}
} catch (e) {
if (e instanceof Deno.errors.NotFound) {
throw new Error(
`Could not find file: ${fnFilePath}. Make sure your function's "source_file" is relative to your project root.`,
);
}
throw new Error(e);
}

Expand Down

0 comments on commit 6841c6c

Please sign in to comment.