RFR: 2411: Host::user should throw when failing

Zhao Song zsong at openjdk.org
Thu Nov 21 17:46:12 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.

Marked as reviewed by zsong (Reviewer).

-------------

PR Review: https://git.openjdk.org/skara/pull/1698#pullrequestreview-2452219663


More information about the skara-dev mailing list