Skip to content

Fix #330 Potentially request.body can be None when using a custom adapter - #331

Merged
seratch merged 2 commits into
slackapi:mainfrom
seratch:issue-330-request-body-none
May 10, 2021
Merged

seratch merged 2 commits into
slackapi:mainfrom
seratch:issue-330-request-body-none

Conversation

@seratch

@seratch seratch commented May 8, 2021

Copy link
Copy Markdown
Contributor

This pull request resolves #330 by updating the request parsers.

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@codecov

codecov Bot commented May 8, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #331 (caac693) into main (31436f7) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #331      +/-   ##
==========================================
+ Coverage   91.48%   91.54%   +0.05%     
==========================================
  Files         167      167              
  Lines        5369     5367       -2     
==========================================
+ Hits         4912     4913       +1     
+ Misses        457      454       -3     
Impacted Files Coverage Δ
slack_bolt/request/internals.py 93.43% <ø> (+0.62%) ⬆️
slack_bolt/request/async_request.py 94.28% <100.00%> (+2.85%) ⬆️
slack_bolt/request/request.py 97.05% <100.00%> (+2.94%) ⬆️

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 31436f7...caac693. Read the comment docs.

return "`body` must be a raw string data when running in the HTTP server mode"


def error_message_unknown_request_body_type() -> str:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed this error message template as it's in internals source file and I'm sure no code outside this project uses it.

@seratch
seratch merged commit ace3cb8 into slackapi:main May 10, 2021
@seratch
seratch deleted the issue-330-request-body-none branch May 10, 2021 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potentially request.body can be None when using a custom adapter

2 participants