# Sanic raises "Invalid response type None" error

**URL:** <https://forum.rasa.com/t/sanic-raises-invalid-response-type-none-error/57332>\
**Category:** Rasa Open Source\
**Created:** [February 24, 2023, 5:43pm UTC](https://forum.rasa.com/t/sanic-raises-invalid-response-type-none-error/57332 "2023-02-24T17:43:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScienceGuy](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@ScienceGuy](https://forum.rasa.com/u/ScienceGuy)\
**Post date:** [February 24, 2023, 5:43pm UTC](https://forum.rasa.com/t/sanic-raises-invalid-response-type-none-error/57332/1 "2023-02-24T17:43:08Z")

</div>

Hi, I have a setup with Rasa 3.4.0. From today, I receive an error from Sanic: `sanic.exceptions.ServerError: Invalid response type None (need HTTPResponse)`

The request was for this url:

```auto
ws://rasa-production:5005/socket.io/?transport=websocket&EIO=4&t=1677256668.530688

```

I could find older posts about such errors, but I am not sure if there is still a bug with the Rasa [socket.io](http://socket.io) connection or if its my code. Where should I look to fix this error?

---

<div class="post-metadata">

**Author:** ![Isabella69](https://avatars.discourse-cdn.com/v4/letter/i/e480ec/32.png) [@Isabella69](https://forum.rasa.com/u/Isabella69)\
**Post date:** [February 27, 2023, 10:18am UTC](https://forum.rasa.com/t/sanic-raises-invalid-response-type-none-error/57332/2 "2023-02-27T10:18:57Z")

</div>

The “Invalid response type None” error in Sanic typically occurs when the handler function returns None instead of a valid response object.

---

<div class="post-metadata">

**Author:** ![ScienceGuy](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@ScienceGuy](https://forum.rasa.com/u/ScienceGuy)\
**Post date:** [February 27, 2023, 4:20pm UTC](https://forum.rasa.com/t/sanic-raises-invalid-response-type-none-error/57332/3 "2023-02-27T16:20:49Z")

</div>

That means there is likely a problem with the response template definiton (e.g. typo)?
