The error you encountered is a LocalProtocolError. This error typically indicates an issue with the HTTP protocol, such as an illegal header value or a violation of the HTTP specification. In my case, the error specifically mentions an "Illegal header value" related to the Bearer token, indicating a problem with how the token is handled or passed in the HTTP headers.
I tried running it locally with port number 1000, and I succeeded in getting a valid response but when I tried running remotely the assigned URL I was facing Error 500: Internal Server Error.