Improve erorr handling when cosigner key is missing
- Dominant language
- Rust
- Stars
- 58
- Forks
- 14
- Avg merge
- 4d 43m
- Merged PRs (30d)
- 11
Description
I recently deployed a new log for mtc_worker (#141) and forgot to create the corresponding secret (`SIGNING_KEY_shard2`). This is the error that I got:
```
POST https://bootstrap-mtca.cloudflareresearch.com/logs/shard2/add-entry - Ok @ 10/23/2025, 1:55:33 PM
POST http://fake_url.com/add_batch - Exception Thrown @ 10/23/2025, 1:55:34 PM
✘ [ERROR] Error: unreachable
```
That's not very helpful. Instead of panicking, we should handle this gracefully as a 5xx error.
Contributor guide
Research direction
Trace the /logs/{shard}/add-entry handler and the SIGNING_KEY_shard2 lookup, starting with the missing-secret failure path. Reproduce the deployment scenario with the cosigner key absent and verify that the endpoint returns a 5xx response instead of panicking or reporting an unhelpful error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100