RFR: 2411: Host::user should throw when failing
Kevin Rushforth
kcr at openjdk.org
Wed Nov 20 15:52:26 UTC 2024
On Wed, 20 Nov 2024 15:12:10 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
> 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.
Thanks for the clarification.
-------------
PR Comment: https://git.openjdk.org/skara/pull/1698#issuecomment-2488947498
More information about the skara-dev
mailing list