element-hq / element-hq/synapse
`/federation/v1/send` returns 404 and logs at INFO for "Could not find event" errors
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#10597](https://github.com/matrix-org/synapse/issues/10597).
---
**Description:**
Currently "Could not find event" federation errors are logged with `INFO` level, here is example of such string:
```
2021-08-12 12:00:57,947 - synapse.http.server - 88 - INFO - PUT-1922933- SynapseError: 404 - Could not find event $Dv3wmat7XbtBm4O37eT+Oa2kxHKUfCj36nCMiHyj5F4
```
But this error may cause the large problem with whole federation process, such as described in #10589 and #6867.
So better is to treat this error with `ERROR` logging level, or, at least, WARNING, for easier figuring out that problem, because many admins try to check errors only by filtering logs by `ERROR` level, because of huge amount of log lines, and even didn't see that problem.
Contributor guide
Research direction
Search the repository for the exact "Could not find event" message and trace how requests to /federation/v1/send are logged. Done means this 404 is emitted at WARNING or ERROR instead of INFO, with the relevant federation behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100