Watch handlers should get called on rpc error
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
When an rpc error (eg, 500 because of failure/resulting master election) occurs watches should be called in some indicative way so that action can be taken if necessary.
Things like this:
```
2015/07/11 03:13:33 consul.watch: Watch (type: service) errored: Unexpected response code: 500 (rpc error: unexpected EOF), retry in 5s
```
In the middle of `consul watch ` output
Also when specifying unknown datacenters:
```
2015/07/11 18:17:06 [ERR] http: Request /v1/health/service/something?dc=unknowndc01, error: No path to datacenter
```
Watches in the config/initiated from client should have a chance to fire to handle these or maybe specify a separate error handler.
Contributor guide
Research direction
Start with the `consul watch` implementation and trace how watches in config and watches initiated from a client receive RPC responses. Determine how RPC failures such as HTTP 500 responses and unknown datacenters should be exposed to watch handlers, then define completion around an actionable error notification or separate error handler.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100