Add errors to InvalidRequestException + some other small changes.