I have this snippet of code in Python that is uploading a file to slack, it used to work until recently when suddenly its failing exactly 30 seconds after initiating the upload request due to this server response:
slack_sdk.errors.SlackApiError: 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': 'Tue, 18 Jan 2022 08:12:58 GMT', 'server': 'envoy', 'via': 'envoy-edge-fra-f6ad', 'connection': 'close'}, 'body': 'stream timeout'}
this is my code (just the relevant lines):
slackClient=slack_sdk.WebClient(token=slackToken, timeout=300)
upload = slackClient.files_upload(file=file, filename=file)
this is not related to the timeout parameter, I tried with and without it (and it used to work as is before)
what is the reason for this error and how can I fix it?