Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Change no pending batches 404 error into a success response (#279)
# What ❔ When no pending batches were found on the server API, the response was a 404 which was not handled on the client (gateway) side and was treated as an HTTP client error, causing a misleading log line: ```2023-10-19T18:30:46.726413Z ERROR zksync_prover_fri_gateway::api_data_fetcher: HTTP request failed due to error: HTTP status client error (404 Not Found) for url (http://127.0.0.1:3320/proof_generation_data)``` When testing out the gpu proving pipeline for the ZK stack effort, the error was hit soon after starting all services. This PR changes this so in info trace is printed stating that there are currently no pending batches to be proven. <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ There is some semantic dissonance on receiving an HTTP client error and a log line when calling the API, since it's possible and reasonable that there are no pending batches at some points. <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`.
- Loading branch information