-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileWatcher should throw NoSuchFileException? #532
Labels
Comments
I think there should be an option for this behavior, because some users might want to wait until the file is created. I agree that the default behavior should be to throw an exception. |
minwoox
added a commit
to minwoox/centraldogma
that referenced
this issue
Jun 11, 2021
Motivation: Related line#532 Currently, when we try to watch a file which doesn't exist, the watch API waits until the file is added or timeout happens. It sometimes makes user difficult to debug because the client cannot distinguish such cases. Modifications: - Add `notify-entry-not-found` preference to the watch `Prefer` header. - https://datatracker.ietf.org/doc/html/rfc7240#section-4 Result: - You can now get notified if the entry doesn't exist when watching. To-do: - Add the option to client-side
minwoox
added a commit
to minwoox/centraldogma
that referenced
this issue
Jun 11, 2021
Motivation: Related line#532 Currently, when we try to watch a file which doesn't exist, the watch API waits until the file is added or timeout happens. It sometimes makes user difficult to debug because the client cannot distinguish such cases. Modifications: - Add `notify-entry-not-found` preference to the watch `Prefer` header. - https://datatracker.ietf.org/doc/html/rfc7240#section-4 Result: - You can now get notified if the entry doesn't exist when watching. To-do: - Add the option to client-side
I try to handle this issue. |
minwoox
added a commit
that referenced
this issue
Nov 25, 2021
…610) Motivation: Related #532 Currently, when we try to watch a file that doesn't exist, the watch API waits until the file is added or timeout happens. It sometimes makes user difficult to debug because the client cannot distinguish such cases. Modifications: - Add `notify-entry-not-found` preference to the watch `Prefer` header. - https://datatracker.ietf.org/doc/html/rfc7240#section-4 Result: - You can now get notified if the entry doesn't exist when watching. To-do: - Add the option to client-side
This was referenced Dec 1, 2021
minwoox
pushed a commit
that referenced
this issue
Dec 9, 2021
### Motivation - #532 - To-Do of #610 ### Modifications - Put value of `notify-entry-not-found` on `Prefer` request header to get error that entries are not found on watching file/repository - Propagate error that entries are not found into `Watcher#initialValueFuture` ### Result - You can get error on watching file/repository if the entry doesn't exist.
Closed via #653 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
FileWatcher.awaitInitialValue(...);
throwsTimeoutException
rather thanNoSuchFileException
if the file, which the watcher tries to watch, does not exist.It makes the user hard to find the cause.
The text was updated successfully, but these errors were encountered: