Integrated: 2059: Improve error message when cli encounters 401

Zhao Song zsong at openjdk.org
Thu Oct 19 15:01:24 UTC 2023


On Wed, 18 Oct 2023 21:25:13 GMT, Zhao Song <zsong at openjdk.org> wrote:

> As Erik said in the issue "A user tried to run `git pr checkout` and got UncheckedRestException with 401. The repository in question had remotes pointing to a gitlab instance while the user was trying to get a PR from github. Not sure if that is relevant here. We should not fail with a stacktrace but should rather explain that we authorization failed and print which URL we tried to connect to."
> 
> To not fail with a stack trace, in this patch, `UncheckedRestException` will be caught in the `GitSkara#main` and status code will be checked, if the status code is 401, the cli tool should print suitable error message to the user.

This pull request has now been integrated.

Changeset: f3408c35
Author:    Zhao Song <zsong at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/f3408c35627b04ccf8638ced7be464ae542bbe10
Stats:     35 lines in 5 files changed: 22 ins; 0 del; 13 mod

2059: Improve error message when cli encounters 401

Reviewed-by: erikj

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

PR: https://git.openjdk.org/skara/pull/1571


More information about the skara-dev mailing list