Skip to content

Commit

Permalink
Fix "ValueError: Can redirect only to http or https" in query_http_uri
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Mar 27, 2024
1 parent 288f3d7 commit 9c8a845
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ async def get_torrent_info(self, request):
elif scheme in (HTTP_SCHEME, HTTPS_SCHEME):
try:
response = await query_http_uri(uri)
except (ServerConnectionError, ClientResponseError, SSLError, ClientConnectorError, AsyncTimeoutError) as e:
except (ServerConnectionError, ClientResponseError, SSLError, ClientConnectorError, AsyncTimeoutError,
ValueError) as e:
self._logger.warning(f'Error while querying http uri: {e}')
return RESTResponse({"error": str(e)}, status=HTTP_INTERNAL_SERVER_ERROR)

Expand Down

0 comments on commit 9c8a845

Please sign in to comment.