-
Notifications
You must be signed in to change notification settings - Fork 852
File Upload API succeeds despite 408 Request Timeout #1165
Copy link
Copy link
Closed
Labels
Version: 3xauto-triage-skipbugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedserver-side-issueweb-client
Milestone
Description
Reproducible in:
# test.py
import sys
# Enable debug logging
import logging
from slack_sdk import WebClient
def uploadToSlackChannel():
client = WebClient(
token="you-slack-token", timeout=300)
try:
filepath = "file-to-upload"
response = client.files_upload(
channels="your-slack-channel-name", file=filepath)
assert response["file"] # the uploaded file
except Exception as e:
print(e)
uploadToSlackChannel() The Slack SDK version
slack-sdk==3.13.0
Python runtime version
Python 3.9.10
OS info
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H1615
Darwin Kernel Version 19.6.0: Sun Nov 14 19:58:51 PST 2021; root:xnu-6153.141.50~1/RELEASE_X86_64
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))
- copy the above snippet to any file (e.g. upload_to_slack.py)
- run
python3 upload_to_slack.py
Expected result:
Should succeed without any error
Actual result:
The file gets uploaded but also throws this error
Received a response in a non-JSON format: stream timeout
The server responded with: {'status': 408, 'headers': {'x-edge-backend': 'envoy-www', 'content-length': '14', 'content-type': 'text/plain', 'x-slack-edge-shared-secret-outcome': 'no-match', 'date': 'Wed, 26 Jan 2022 07:12:45 GMT', 'server': 'envoy', 'via': 'envoy-edge-bom-jbcm', 'connection': 'close'}, 'body': 'stream timeout'}
Requirements
For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Version: 3xauto-triage-skipbugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documentedserver-side-issueweb-client