Skip to content

Conversation

@leekahung
Copy link
Contributor

As mentioned in issue #1710, there has been an issue where a case is on record but requires multiple attempts/refreshes on the API endpoint before the case details can be accessed.

This PR attempts to resolve this with a minor tweak to the get function for loading cases from the courts. In the fix, a retry loop is introduced with 3 retries at 2-second backoff intervals before erroring out. This would take the load off the user needing to manually refresh or open the case file link several times, the loop will attempt this for them.

In theory, this should solve the issue mentioned in issue #1710, but I couldn't test the loop locally. I believe the API endpoint we set up is restricted to the main site only?

However, depending on how flaky the connection with the court servers is, we could adjust the backoff time to 3 seconds between attempts from 2 seconds.

@leekahung leekahung requested a review from wittejm January 22, 2026 23:30
@leekahung leekahung added the backend Python/Make/Docker/etc. label Jan 22, 2026
Copy link
Contributor

@wittejm wittejm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! You said

I believe the API endpoint we set up is restricted to the main site only?

Not clear what you're referring to. Are you able to run the stack locally and do you have login credentials?

@leekahung
Copy link
Contributor Author

Not clear what you're referring to. Are you able to run the stack locally and do you have login credentials?

Yeah, was able to get the stack running locally and was able to login with the creds Michael gave me. 👍 I'll send you a DM of the error.

@leekahung leekahung merged commit 030b928 into master Jan 23, 2026
7 checks passed
@leekahung leekahung deleted the issue-1710/add-retries-to-case-loading branch January 23, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Python/Make/Docker/etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants