diff --git a/packages/api-cardano-db-hasura/src/executableSchema.ts b/packages/api-cardano-db-hasura/src/executableSchema.ts index cdddcfde..62d87ab6 100644 --- a/packages/api-cardano-db-hasura/src/executableSchema.ts +++ b/packages/api-cardano-db-hasura/src/executableSchema.ts @@ -40,7 +40,7 @@ export async function buildSchema ( ) { const throwIfNotInCurrentEra = async (queryName: string) => { if (!(await hasuraClient.isInCurrentEra())) { - return new ApolloError(`${queryName} results are only available when close to the network tip. This is expected during the initial chain-sync.`) + throw new ApolloError(`${queryName} results are only available when close to the network tip. This is expected during the initial chain-sync.`) } } return makeExecutableSchema({