Skip to content

Fix Bill History Scraper#2123

Open
ACoullard wants to merge 2 commits intocodeforboston:mainfrom
ACoullard:AC/fix-bill-history-null-date-issue
Open

Fix Bill History Scraper#2123
ACoullard wants to merge 2 commits intocodeforboston:mainfrom
ACoullard:AC/fix-bill-history-null-date-issue

Conversation

@ACoullard
Copy link
Copy Markdown
Collaborator

Summary

Fixes a bug where billHistory items with null dates ( some of which were present in bills from session 194 ) would fail to be ingested and possibly crash the entire scraper batch.
Addresses issue #2120

Steps to test/reproduce

Running the scrapers should no longer produce errors that look like the following:

  ⚠  functions: ValidationError: Validation failed:                                                                                                               
  [
    {                                                                                                                                                             
      "Date": "Expected string, but was null"
    }                                                                                                                                                             
  ].                                     
  Object should match { Date: string; Branch: string; Action: string; }[]                                                                                         
      at new ValidationError (/app/functions/node_modules/runtypes/lib/errors.js:22:28)                                                                           
      at Object.check (/app/functions/node_modules/runtypes/lib/runtype.js:37:19)                                                                                 
      at Object.getBillHistory (/app/functions/lib/malegislature.js:146:32)                                                                                       
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)                                                                               
      at async fetchResource (/app/functions/lib/bills/bills.js:44:25)                                                                                            
      at async /app/functions/lib/scraper.js:85:34                                                                                                                
      at async runFunction (/app/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:506:9)                                                      
      at async runBackground (/app/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:507:9)                                                    
  ⚠  Your function was killed because it raised an unhandled error.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

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

Project Deployment Actions Updated (UTC)
maple-dev Ready Ready Preview, Comment May 7, 2026 5:48am

Request Review

@ACoullard ACoullard self-assigned this May 7, 2026
@ACoullard ACoullard added the bug Something isn't working label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant