Make sure we throw errors within resolvers

This commit is contained in:
Lourens Schep 2022-05-24 14:59:44 -03:00
parent 4f3bf0f112
commit df565786c0
1 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,7 @@ export function* getProducts( query: Partial< ProductQuery > ) {
return items;
} catch ( error ) {
yield getProductsError( query, error );
return error;
throw error;
}
}
@ -44,5 +44,6 @@ export function* getProductsTotalCount( query: Partial< ProductQuery > ) {
return totalCount;
} catch ( error ) {
yield getProductsTotalCountError( query, error );
throw error;
}
}