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

fix: make_request - prevents an error during response parsing if the response body is empty. #24613

Merged
merged 5 commits into from
Feb 10, 2024

Conversation

tonspar
Copy link
Contributor

@tonspar tonspar commented Jan 30, 2024

Sometimes the returned response body is empty. This change prevents the error during frappe response parsing. For example DELETE request returns no content.

Sometimes the returned response body is empty. This change prevents the error during frappe response parsing. For example DELETE request returns no content.
@tonspar tonspar requested review from a team and akhilnarang and removed request for a team January 30, 2024 10:18
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (b3b02c8) 62.11% compared to head (edbfb69) 62.05%.
Report is 37 commits behind head on develop.

❗ Current head edbfb69 differs from pull request most recent head b4695d2. Consider uploading reports for the commit b4695d2 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24613      +/-   ##
===========================================
- Coverage    62.11%   62.05%   -0.07%     
===========================================
  Files          787      786       -1     
  Lines        75359    75156     -203     
  Branches      6441     6437       -4     
===========================================
- Hits         46812    46639     -173     
+ Misses       24847    24822      -25     
+ Partials      3700     3695       -5     
Flag Coverage Δ
server 70.93% <0.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ankush ankush enabled auto-merge (squash) February 10, 2024 08:38
@ankush ankush disabled auto-merge February 10, 2024 08:38
@ankush ankush changed the title feat: make_request - prevents an error during response parsing if the response body is empty. fix: make_request - prevents an error during response parsing if the response body is empty. Feb 10, 2024
@ankush ankush enabled auto-merge (squash) February 10, 2024 08:39
@ankush ankush merged commit c12b753 into frappe:develop Feb 10, 2024
21 of 23 checks passed
@tonspar
Copy link
Contributor Author

tonspar commented Feb 15, 2024

Hello @ankush,
thank you very much for the review and editing this PR.
I have tested in local frappe copy and I think here is "return" missing on row 30:

https://github.com/frappe/frappe/blob/f9b5d60ec9a623e502f38ca28442a0e0a094e6d0/frappe/integrations/utils.py#L30C1-L30C19

Thanks for review in advance.
Kind Regards.
Jiri Sir

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
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.

None yet

2 participants