We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6d1de6 commit cbd0bcdCopy full SHA for cbd0bcd
1 file changed
apps/webapp/app/services/queryService.server.ts
@@ -94,7 +94,7 @@ export async function executeQuery<TOut extends z.ZodSchema>(
94
// If query succeeded and history options provided, save to history
95
if (result[0] === null && history) {
96
const stats = result[1].stats;
97
- const byteSeconds = parseFloat(stats.byte_seconds);
+ const byteSeconds = parseFloat(stats.byte_seconds) || 0;
98
const costInCents = byteSeconds * env.CENTS_PER_QUERY_BYTE_SECOND;
99
100
await prisma.customerQuery.create({
0 commit comments