Skip to content

Commit f66c6bd

Browse files
committed
add log
1 parent 5cf4813 commit f66c6bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/billing/src/balance-calculator.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as schema from '@codebuff/common/db/schema'
33
import { withSerializableTransaction } from '@codebuff/common/db/transaction'
44
import { TEST_USER_ID } from '@codebuff/common/old-constants'
55
import { GrantTypeValues } from '@codebuff/common/types/grant'
6-
import { failure, success } from '@codebuff/common/util/error'
6+
import { failure, getErrorObject, success } from '@codebuff/common/util/error'
77
import { and, asc, gt, isNull, or, eq, sql } from 'drizzle-orm'
88

99
import type { GrantType } from '@codebuff/common/db/schema'
@@ -481,6 +481,10 @@ export async function consumeCreditsAndAddAgentStep(params: {
481481
}),
482482
)
483483
} catch (error) {
484+
logger.error(
485+
{ error: getErrorObject(error) },
486+
'Error consuming credits and adding agent step',
487+
)
484488
return failure(error)
485489
}
486490
}

0 commit comments

Comments
 (0)