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 #718 by handling unexpected response body format #751

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

seratch
Copy link
Member

@seratch seratch commented Jul 15, 2020

Summary

This pull request fixes #718 by adding the logic to handle non-JSON response body data in WebClient (both sync and async). Although the situation almost never happens, raising only the errors defined in this SDK is more developer-friendly. Refer to the issue for details and use cases.

Requirements (place an x in each [ ])

Siteproxy
@seratch seratch added Version: 2x enhancement M-T: A feature request for new functionality web-client labels Jul 15, 2020
@seratch seratch added this to the 2.7.3 milestone Jul 15, 2020
@seratch seratch self-assigned this Jul 15, 2020
@codecov
Copy link

codecov bot commented Jul 15, 2020

Codecov Report

Merging #751 into main will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #751      +/-   ##
==========================================
+ Coverage   85.15%   85.19%   +0.03%     
==========================================
  Files          22       22              
  Lines        2803     2810       +7     
  Branches      281      283       +2     
==========================================
+ Hits         2387     2394       +7     
+ Misses        312      311       -1     
- Partials      104      105       +1     
Impacted Files Coverage Δ
slack/web/base_client.py 72.27% <100.00%> (+0.61%) ⬆️

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 c1c419f...df1f9d8. Read the comment docs.

@seratch seratch merged commit 93a4731 into slackapi:main Jul 16, 2020
@seratch seratch deleted the issue-718-html-response branch July 16, 2020 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality Version: 2x web-client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raise a more relevant error when getting a JSONDecodeError for some reasons
2 participants