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

Use Error property when throwing exception #1448

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

marcominerva
Copy link
Contributor

What kind of change does this PR introduce?
Bug fix

What is the current behavior?
See #1376

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)

Other information:
Fixes #1376

@marcominerva marcominerva changed the title Use Error property when throwing exception #1376 Use Error property when throwing exception Nov 29, 2022
@304NotModified
Copy link

✅️ Tests for the changes have been added (for bug fixes / features)

I dont see any tests in this PR?

@marcominerva
Copy link
Contributor Author

Is adding a new test class to Refit.Tests enough? Thank you @304NotModified

@304NotModified
Copy link

304NotModified commented Dec 12, 2022

That's a bit hard to decide without any test code.

But I think only an unit tests is needed, not a integration test / service test or something like that. (See https://martinfowler.com/articles/practical-test-pyramid.html)

martinfowler.com
Find out what kinds of automated tests you should implement for your application and learn by examples what these tests could look like.

@marcominerva
Copy link
Contributor Author

Thank you for the clarification @304NotModified, I have added a Unit test for this change.

Refit.Tests/ResponseTests.cs Outdated Show resolved Hide resolved
Refit.Tests/ResponseTests.cs Outdated Show resolved Hide resolved
@304NotModified
Copy link

Thanks for the tests! Added some comments to make them a bit better :)

@marcominerva
Copy link
Contributor Author

Done :) Let me know if now is OK!

Copy link

@304NotModified 304NotModified left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nathanpovo
Copy link

This will also fix #1465

@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 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Unable to throw a ValidationApiException exception
4 participants