Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

feat(v1): add insufficient credits stuff

Móricz Gergőafea2eeaac0b
diff --git a/apps/api/src/routes/v1.ts b/apps/api/src/routes/v1.ts
index f92fe024c..b0f16e111 100644
--- a/apps/api/src/routes/v1.ts
+++ b/apps/api/src/routes/v1.ts
@@ -50,6 +50,13 @@ function checkCreditsMiddleware(
if (!success) {
logger.error(
`Insufficient credits: ${JSON.stringify({ team_id: req.auth.team_id, minimum, remainingCredits })}`,
+ {
+ teamId: req.auth.team_id,
+ minimum,
+ remainingCredits,
+ request: req.body,
+ path: req.path
+ }
);
if (!res.headersSent) {
return res.status(402).json({