Fixing request handling for invalid URIs and NPEs in early exceptions