Skip to content

Fix cloud webhook body#20739

Merged
balloob merged 3 commits intodevfrom
fix-cloud-webhook-body
Feb 4, 2019
Merged

Fix cloud webhook body#20739
balloob merged 3 commits intodevfrom
fix-cloud-webhook-body

Conversation

@pvizeli
Copy link
Copy Markdown
Member

@pvizeli pvizeli commented Feb 4, 2019

Description:

I change it to text because we only support text as response and aioHttp perform the correct charset that not need to be utf-8 like we set now static.

Fix:

Error handling message
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cloud/iot.py", line 237, in _handle_connection
    hass, self.cloud, msg['handler'], msg['payload'])
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cloud/iot.py", line 293, in async_handle_message
    return (yield from handler(hass, cloud, payload))
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cloud/iot.py", line 366, in async_handle_webhook
    body = body.decode('utf-8')
AttributeError: 'StringPayload' object has no attribute 'decode'

@pvizeli
Copy link
Copy Markdown
Member Author

pvizeli commented Feb 4, 2019

Address comments from #20737 after the commit and linter destroy the branch

@pvizeli pvizeli force-pushed the fix-cloud-webhook-body branch from d595682 to 3a292de Compare February 4, 2019 15:35
@balloob balloob added this to the 0.87.0 milestone Feb 4, 2019
@balloob balloob merged commit 29b64d5 into dev Feb 4, 2019
@ghost ghost removed the in progress label Feb 4, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix-cloud-webhook-body branch February 4, 2019 18:58
balloob pushed a commit that referenced this pull request Feb 5, 2019
* Bugfix cloud webhooks text response

* address comments

* Fix lint
@balloob balloob mentioned this pull request Feb 6, 2019
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.

3 participants