Skip to content

Commit 9658c3e

Browse files
committed
Fix failed UT.
1 parent b9b603b commit 9658c3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UnitTestProject1/Tests/SiteTokenTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public async Task BadTokenTest(string endpointUrl, string sandboxPageTitle)
7979
// This should cause token cache invalidation.
8080
await page.EditAsync(new WikiPageEditOptions { Content = page.Content!, Summary = "Make an empty update.", Minor = true });
8181
}
82-
catch (OperationFailedException ex) when (ex.ErrorCode == "globalblocking-blockedtext-range")
82+
catch (OperationFailedException ex) when (ex.ErrorCode is "blocked" or "globalblocking-blockedtext-range")
8383
{
8484
// wikimedia-globalblocking-ipblocked-range
8585
Output.WriteLine("UpdateContentAsync fails due to IP block: " + ex);

0 commit comments

Comments
 (0)