Skip to content

feat: Extend the UnexpectedStatus exception to include the response's content #729

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 5 commits into from
Mar 21, 2023

Conversation

expobrain
Copy link
Collaborator

It's useful to inspect the content of the response in case of an unexpected status code.

This PR adds the response's content in the UnexpectedStatus exception to be able to inspect the what the serve returned i.e. in case of a 400 error.

@expobrain expobrain force-pushed the enriched_exception branch 2 times, most recently from 7d99522 to 7bb26ec Compare February 24, 2023 10:56
dbanty
dbanty previously requested changes Mar 12, 2023
Copy link
Collaborator

@dbanty dbanty left a comment

Choose a reason for hiding this comment

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

Thanks! Just one tweak requested to avoid potentially-breaking change

@codecov
Copy link

codecov bot commented Mar 12, 2023

Codecov Report

Merging #729 (e98855d) into main (cf8eafc) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #729   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         1971      1971           
=========================================
  Hits          1971      1971           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@emann emann left a comment

Choose a reason for hiding this comment

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

One comment was resolved, LGTM!

@dbanty to merge

@dbanty dbanty dismissed their stale review March 21, 2023 00:27

Changes made

@dbanty dbanty changed the title Extend the UnexpectedStatus exception to include the response's content feat: Extend the UnexpectedStatus exception to include the response's content Mar 21, 2023
@dbanty dbanty merged commit 47cfdec into openapi-generators:main Mar 21, 2023
@expobrain expobrain deleted the enriched_exception branch March 21, 2023 00:30
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.

3 participants