Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt mocks a bit so that they behave more like NGitLab #842

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

louis-z
Copy link
Member

@louis-z louis-z commented Feb 3, 2025

  • Get rid of Mocks-specific GitLabBadRequestException, GitLabForbiddenException and GitLabNotFoundException
  • Use NGitLab's GitLabException instead
  • Add internal static methods to GitLabException, to ease the creation of specific exceptions

Closes to #841

@louis-z louis-z marked this pull request as ready for review February 4, 2025 13:37
@louis-z louis-z requested a review from a team as a code owner February 4, 2025 13:37
@louis-z louis-z requested review from Toa741 and removed request for a team February 4, 2025 13:37
@louis-z louis-z force-pushed the adapt-mocks-a-bit-so-that-they-behave-more-like-n branch 3 times, most recently from 8363f64 to 082ebce Compare February 4, 2025 14:04
@Toa741
Copy link
Contributor

Toa741 commented Feb 4, 2025

  • NotFound exception is only in mock
  • Can be misleading (catching this type only instead of the base exception)
  • Remove GitLabNotFoundException, use ctors or methods to create GitLabException with correct status code, so the mock & client always return the same type of exception

@louis-z louis-z marked this pull request as draft February 4, 2025 15:55
@louis-z louis-z marked this pull request as ready for review February 4, 2025 18:40
@louis-z louis-z force-pushed the adapt-mocks-a-bit-so-that-they-behave-more-like-n branch from 9679e9b to 2b16589 Compare February 4, 2025 18:55
@Toa741 Toa741 merged commit cd9f801 into main Feb 4, 2025
10 checks passed
@Toa741 Toa741 deleted the adapt-mocks-a-bit-so-that-they-behave-more-like-n branch February 4, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants