java-gitlab-api icon indicating copy to clipboard operation
java-gitlab-api copied to clipboard

Getting user via sudo doesn't work

Open minifreak opened this issue 7 years ago • 1 comments

Trying to get a Gitlab user doesn't seems to work properly: GitlabUser user = gitLabAPI.getUserViaSudo("test"); java.io.FileNotFoundException: https://gitlab.example.com/api/v4/user?sudo=test is thrown.

With curl it works properly even if the user doesn't exist:

curl --header "PRIVATE-TOKEN: XXXXXXXXXXXXXXXXX" https://gitlab.example.com/api/v4/user?sudo=test
{"message":"404 No user id or username for: test Not Found"}

minifreak avatar Jun 30 '17 11:06 minifreak

Forgot to mention that I'm using a master built (recent pull) and my gitlab version is 9.3. Also, worth to note that it breaks on parse@GiltHTTPRequestor line 394.

minifreak avatar Jun 30 '17 11:06 minifreak