export function parseResultFromBigQuery()

in bandit/src/query-lambda/parse-result.ts [18:27]


export function parseResultFromBigQuery(result: SimpleQueryRowsResponse): VariantQueryRow[] {
	const parse = variantQueryRowsSchema.safeParse(result[0]);

	if (!parse.success) {
		console.log(parse.error);
		throw new QueryReturnedInvalidDataError();
	}

	return parse.data;
}