Repository navigation
Improve request parser for better compatibility with Socket Mode - #169
Merged
Merged
Conversation
|
@seratch - Hi. I am using the slack_bolt package and started getting a new error. Looking at the logs, I traced back to this PR on the same part of the code. I am getting this when I am trying to send a message-shortcut. (I can't pinpoint why the change you made would cause the issue but the timing is curious. Can you please help? Let me know how I can get more logs to help. Here is the error. Exception happened during processing of request from ('127.0.0.1', 44298)
Traceback (most recent call last):
File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.7/http/server.py", line 646, in __init__
super().__init__(*args, **kwargs)
File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
self.handle()
File "/usr/lib/python3.7/http/server.py", line 426, in handle
self.handle_one_request()
File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
method()
File "/app/.local/lib/python3.7/site-packages/slack_bolt/app/app.py", line 881, in do_POST
body=request_body, query=query, headers=self.headers
File "/app/.local/lib/python3.7/site-packages/slack_bolt/request/request.py", line 43, in __init__
self.context = build_context(BoltContext(context if context else {}), self.body)
File "/app/.local/lib/python3.7/site-packages/slack_bolt/request/internals.py", line 114, in build_context
enterprise_id = extract_enterprise_id(payload)
File "/app/.local/lib/python3.7/site-packages/slack_bolt/request/internals.py", line 54, in extract_enterprise_id
elif "id" in org:
TypeError: argument of type 'NoneType' is not iterable |
Contributor
Author
|
@bharat-rangan Can you upgrade to v1.1.1? The fix by this PR is included in the version. |
|
hmm.... I did a force pip-installed and it worked. Sorry if this was a distraction |
|
aha. Just saw your message. Thanks for contributing to this package :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the internals to be �compatible with Socket Mode payloads.
Category (place an
xin each of the[ ])slack_bolt.Appand/or its core componentsslack_bolt.async_app.AsyncAppand/or its core componentsslack_bolt.adapter/docsRequirements (place an
xin 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.
./scripts/install_all_and_run_tests.shafter making the changes.