freelawproject / eyecite

Find legal citations in any block of text
https://freelawproject.github.io/eyecite/
BSD 2-Clause "Simplified" License
114 stars 27 forks source link

fix(hyperscan): Handles the InvalidError exception during db loading. #181

Closed ERosendo closed 1 month ago

ERosendo commented 1 month ago

This PR introduces logic to handle the InvalidError exception during loading the cached hyperscan db and fixes #4053.

According to the documentation, this error (InvalidError) is only returned when the function detects an invalid parameter. Since loaddb only takes one parameter(the serialized Hyperscan database), this error indicates a problem with the input ByteString. The current fix addresses this by triggering a full database recompile whenever this exception is encountered.

github-actions[bot] commented 1 month ago

The Eyecite Report :eye:

Gains and Losses

There were 0 gains and 0 losses.

Click here to see details. | id | Gain | Loss | | ---------- | ------ | ------ |

Time Chart

image

Generated Files

Branch 1 Output Branch 2 Output Full Output CSV

mlissner commented 1 month ago

Sounds good, thanks. Merging. We can cut a release if we want or just let it be. This is rare enough, I think we can wait, and I think we have another issue about not recognizing citations that we'll need to pull in soon anyway.