Skip to content

Is it correct that watcher does not reload credentials after the stream is interrupted? #1559

Answered by clux
cdhowie asked this question in Q&A
Discussion options

You must be logged in to vote

watcher does not do any error handling like this itself, but Client does, and a watcher is ultimately an abstraction on the Client.

Client has an AuthLayer (in its tower stack) in which the RefreshableToken will handle updating updated credentials silently behind the seams (i.e. before the actual business logic of making the watcher http call happens).

So, if you get an error, the watcher will reset the state to default/empty (and you can log that error event), but when you poll the next watcher event it will go through the auth layer before actually making the relist call, and if there are updates needed, they should happen then.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cdhowie
Comment options

@clux
Comment options

clux Aug 14, 2024
Maintainer

Answer selected by cdhowie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants