Skip to content

Commit

Permalink
Merge pull request #7947 from kozlovsky/fix/value-error-query-http-uri
Browse files Browse the repository at this point in the history
Fix "ValueError: Can redirect only to http or https" in query_http_uri
  • Loading branch information
kozlovsky committed Mar 27, 2024
2 parents 288f3d7 + 9c8a845 commit 30c40b1
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 30c40b1

Please sign in to comment.