Skip to content

Fix/softly-ignore-invalid-response-status-code #327

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

Conversation

p1-ra
Copy link
Contributor

@p1-ra p1-ra commented Feb 6, 2021

Title

Fix/softly-ignore-invalid-response-status-code

Description

This PR will make the parser softly ignore responses' invalid status code (not a number). It catch the ValueError exception, inform the end user and continue its processing.

QA Notes & Product impact

The ValueError exception raised when a response's status code is not a valid number won't be propagated anymore.
@dbanty

@p1-ra p1-ra force-pushed the fix/softly-ignore-invalid-response-status-code branch 2 times, most recently from 43775be to 5225cb7 Compare February 6, 2021 23:08
@codecov
Copy link

codecov bot commented Feb 6, 2021

Codecov Report

Merging #327 (b73a3c5) into main (af09640) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #327   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        47           
  Lines         1385      1390    +5     
=========================================
+ Hits          1385      1390    +5     
Impacted Files Coverage Δ
openapi_python_client/parser/openapi.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af09640...b73a3c5. Read the comment docs.

@dbanty
Copy link
Collaborator

dbanty commented Feb 6, 2021

Awesome, thanks for the contribution! Before merging we'll want to make sure all the new code is covered by unit tests and add a CHANGELOG.md entry crediting you. If you have time to do those things then we can get this merged sooner, otherwise I can fix it up next time I do a batch of reviews.

Currently the next release is slated to be 0.8.0 which I want to include some query parameter fixes that we're still debating design on, so it might be a bit before this makes it to a release.

@p1-ra p1-ra force-pushed the fix/softly-ignore-invalid-response-status-code branch from 5225cb7 to 26f8008 Compare February 6, 2021 23:49
@p1-ra p1-ra force-pushed the fix/softly-ignore-invalid-response-status-code branch from 26f8008 to b73a3c5 Compare February 6, 2021 23:57
@p1-ra
Copy link
Contributor Author

p1-ra commented Feb 6, 2021

You're welcome. I've added a new test for it and updated the changelog.

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.

Excellent, thanks again!

@dbanty dbanty merged commit fdeea99 into openapi-generators:main Feb 8, 2021
@dbanty dbanty added this to the 0.8.0 milestone Feb 8, 2021
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