Skip to content

Default client throws on HTTP errors#60

Merged
Gabriel-Darbord merged 1 commit intodevelopfrom
http-client-system-policy
Apr 1, 2026
Merged

Default client throws on HTTP errors#60
Gabriel-Darbord merged 1 commit intodevelopfrom
http-client-system-policy

Conversation

@Gabriel-Darbord
Copy link
Copy Markdown
Member

Use ZnClient >> systemPolicy on the default client instantiated by GitlabApi to enforce HTTP success.
The goal is to get clear errors when HTTP requests fail, rather than getting errors when parsing error messages as if it were the entities the API asked for.
This also adds two retry attempts and enforces setting the accepted content type, which should not hurt.

@badetitou
Copy link
Copy Markdown
Member

This will probably lead to update on the MSR project. But it seems good

@Gabriel-Darbord Gabriel-Darbord merged commit bf0ed4c into develop Apr 1, 2026
2 checks passed
@Gabriel-Darbord Gabriel-Darbord deleted the http-client-system-policy branch April 1, 2026 15:00
Gabriel-Darbord added a commit that referenced this pull request Apr 3, 2026
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