Refactor users.go to remove custom errors

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Work on this issue
  • Close this issue

As reported under #2175 (closed), various functions in users.go return custom errors instead of the API response.

This issue is to refactor the remaining endpoints to remove all custom error logic.

As it is a breaking change, it will need to go into the 2.0 release branch instead of main.

Implementation Guide

  • Read the CONTRIBUTING.md guide for setting up your local development environment and clone the community fork of this project.
  • Switch to the release-client-2.0 branch.
  • Refactor any functions in users.go that use the custom errors listed https://gitlab.com/gitlab-org/api/client-go/-/blob/release-client-2.0/users.go?ref_type=heads#L106 to return the response error instead. See !2581 (merged) for what this looks like.
  • Update any tests, ideally add integration tests.
  • Run make reviewable before raising an MR targeting release-client-2.0.
Edited Jan 22, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading