Skip to content

Commit f01b50b

Browse files
authored
Merge pull request #6517 from Shopify/ah.abort-on-graphql-error
Throw an AbortError when running typegen for non-JS function
2 parents f920c94 + ad33b48 commit f01b50b

File tree

1 file changed

+1
-1
lines changed
  • packages/app/src/cli/services/function

1 file changed

+1
-1
lines changed

packages/app/src/cli/services/function/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export async function buildGraphqlTypes(
127127
options: JSFunctionBuildOptions,
128128
) {
129129
if (!fun.isJavaScript) {
130-
throw new Error('GraphQL types can only be built for JavaScript functions')
130+
throw new AbortError('GraphQL types can only be built for JavaScript functions')
131131
}
132132

133133
return runWithTimer('cmd_all_timing_network_ms')(async () => {

0 commit comments

Comments
 (0)