Skip to content

Commit ab3a371

Browse files
fix(api/cclog): log Supabase insert errors (firecrawl#3444)
The Supabase JS client returns {data, error} on insert failures rather than throwing, so the existing try/catch silently swallowed all insert failures. Read .error and log it so insert failures (e.g. FK violations on stale concurrency-limiter Redis keys) become visible. Co-authored-by: firecrawl-spring[bot] <254786068+firecrawl-spring[bot]@users.noreply.github.com> Co-authored-by: micahstairs <micah@sideguide.dev>
1 parent 5caac5e commit ab3a371

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • apps/api/src/controllers/v0/admin

apps/api/src/controllers/v0/admin/cclog.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@ async function cclog() {
4646
}
4747

4848
try {
49-
await supabase_service.from("concurrency_log").insert(entries);
49+
const { error } = await supabase_service
50+
.from("concurrency_log")
51+
.insert(entries);
52+
if (error) {
53+
logger.error("Error inserting", {
54+
error,
55+
entryCount: entries.length,
56+
});
57+
}
5058
} catch (e) {
5159
logger.error("Error inserting", { error: e });
5260
}

0 commit comments

Comments
 (0)