Implement a better way of handling non-HTTP urls in client.ClientSession #2507
Closed
Description
Long story short
This is a follow-up for #2479 (comment).
Currently, if one uses ClientSession and it reaches URL with custom schema the exception with insufficient metadata is being raised.
Expected behaviour
There should be some way to give control back to the caller once we reach valid URL, which we cannot follow because of unsupported schema. @asvetlov suggested to implement a custom exception for this.
Actual behaviour
ValueError: Can redirect only to http or httpsSteps to reproduce
Query https://steamcommunity.com/mobileconf/conf or steammobile://lostauth/, or twitter://webknjaz