optional debug logging of error responses