Added logging on error responses