Fix the error response when id is not present.