Skip to content

Better Logs for Hearing Scraper#2170

Merged
Mephistic merged 1 commit into
codeforboston:mainfrom
Mephistic:fix-logs
Jun 16, 2026
Merged

Better Logs for Hearing Scraper#2170
Mephistic merged 1 commit into
codeforboston:mainfrom
Mephistic:fix-logs

Conversation

@Mephistic

Copy link
Copy Markdown
Collaborator

Summary

We've run into a recent problem with the hearing scraper where we hit our bill spend limit on AssemblyAI, but did not notice because nothing was emitted to Error Reporting. I believe this is happening because we're catching and handling the error instead of letting it percolate to the Firebase Functions error reporting handler - which is why we see some errors correctly reported, but not all.

This will hit us especially hard on our batch scrapers, because we swallow errors with individual resources to avoid crashing the whole job - which means we can miss widespread issues..

This PR is a test of a fix for this (that can only be confirmed in a deployed environment) - by using the firebase functions error logger directly (instead of indirectly via the console decorators), it should make it simpler for Google Cloud Error Reporting to detect and report these errors.

This is likely related to #2120 - a similar error reporting-related issue we found in our Bill Scraper.

If this works as expected, I'll follow up by instrumenting all of our caught errors in Firebase Functions with the same fix.

…ling the error ourselves has been masking issues where we'd want to investigate even if we don't want the fallback to blow up the whole function execution (particularly in batch scrape jobs). This commit handles the scrapeHearings function where we saw the issue, but there will be follow-ups shortly to handle other functions we have seen this for
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
maple-dev Ready Ready Preview, Comment Jun 16, 2026 7:46pm

Request Review

@Mephistic Mephistic merged commit d3b610b into codeforboston:main Jun 16, 2026
8 of 9 checks passed
@Mephistic

Copy link
Copy Markdown
Collaborator Author

For reference, this worked as expected - I'm going to go through and replace all of the catch/console.errors with functions.logger.errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant