Removed the error code assertion and fixed the expected message