8000 Refit interface methods that return Task<IApiResponse> assign ApiException to the IApiResponse.Error property on error by DouglasKSmith · Pull Request #1290 · reactiveui/refit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refit interface methods that return Task<IApiResponse> assign ApiException to the IApiResponse.Error property on error #1290

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

Merged
merged 3 commits into from
Jan 19, 2022

Conversation

DouglasKSmith
Copy link
Contributor
@DouglasKSmith DouglasKSmith commented Jan 15, 2022

What kind of change does this PR introduce?
Bug fix

What is the current behavior?
Refit interface methods that return Task<IApiResponse> throw ApiException on error, rather than assigning it to the IApiResponse.Error property (like what happens for Task<IApiResponse<T>> or Task<ApiResponse<T>>). See #1289 for more details.

What is the new behavior?
Refit interface methods that return Task<IApiResponse> will assign ApiException to the IApiResponse.Error property on error rather than throw it.

What might this PR break?
Consumers that rely on the old undocumented behavior of ApiException being thrown from Refit interface methods that return Task<IApiResponse>.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

…ponse-returning methods to throw ApiException on error, rather than assigning the exception to IApiResponse.Error
@dnfadmin
Copy link
dnfadmin commented Jan 15, 2022

CLA assistant check
All CLA requirements met.

@DouglasKSmith DouglasKSmith changed the title Bug/i api response error Refit interface methods that return Task<IApiResponse> assign ApiException to the IApiResponse.Error property on error Jan 15, 2022
@clairernovotny
Copy link
Member

Thank you for catching this!

@clairernovotny clairernovotny merged commit a9cda05 into reactiveui:main Jan 19, 2022
@DouglasKSmith DouglasKSmith deleted the bug/IApiResponseError branch January 21, 2022 14:55
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0