Fail asynchronously on invalid URLs.

Failing synchronously triggers an assert as the request isn't fully
initialized yet. Avoid this by failing a bit later. Fixes several
crashes in the testsuite.