Added support for logging invalid request error and not showing it in the console.