Rasa cannot handle any response due to sanic problem

Here is the error I encountered:

2021-01-04 15:04:40 INFO     root  - Rasa server is up and running.
Invalid response object for url b'/webhooks/custom/webhook', Expected Type: HTTPResponse, Actual Type: <class 'NoneType'>
Exception occurred while handling uri: 'http://localhost:5005/webhooks/custom/webhook'
Traceback (most recent call last):
File "C:\Users\j\PycharmProjects\CloudBot_Rasa\venv\lib\site-packages\sanic\server.py", line 477, in write_response
   response.output(
        AttributeError: 'NoneType' object has no attribute 'output'

Here is my rasa version:

Rasa Version     : 2.0.8
Rasa SDK Version : 2.2.0
Rasa X Version   : 0.34.0
Python Version   : 3.7.4
Operating System : Windows-10-10.0.17763-SP0
Python Path      : c:\users\j\pycharmprojects\cloudbot_rasa\venv\scripts\python.exe

@jeffrey008 where did you declare this url? Endpoint or credentials file?

I solve the problem. I am using custom connector, but in receive method I did the following:

@custom_webhook.route("/webhook", methods=["POST"])
async def receive(request: Request) -> HTTPResponse:
    return

Hence the response is none.

I copied the code in custom connector docs and it works fine.