RFR: 2411: Host::user should throw when failing
Erik Joelsson
erikj at openjdk.org
Wed Nov 20 15:17:26 UTC 2024
The implementations of Host::user are all currently returning Optional::empty on any error return code. This means a that a bot checking for the existence of a user encounters an error with a host, e.g. JBS, it will think the user doesn't exist and take actions based on that assumption. This would be correct if the server response was 404, but in all other cases, it would be better if the WorkItem failed to be automatically retried later.
This patch changes the onError lambda for these methods so that it only handles the 404 case, and in all other cases lets the RestException be thrown. This matches the behavior of most other methods in these classes.
-------------
Commit messages:
- SKARA-2411
Changes: https://git.openjdk.org/skara/pull/1698/files
Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1698&range=00
Issue: https://bugs.openjdk.org/browse/SKARA-2411
Stats: 5 lines in 3 files changed: 0 ins; 0 del; 5 mod
Patch: https://git.openjdk.org/skara/pull/1698.diff
Fetch: git fetch https://git.openjdk.org/skara.git pull/1698/head:pull/1698
PR: https://git.openjdk.org/skara/pull/1698
More information about the skara-dev
mailing list