From 97f77ad0c35912e803bd726f852cb95e018a4a4a Mon Sep 17 00:00:00 2001 From: Eastman Date: Thu, 7 Sep 2023 08:51:57 +0300 Subject: [PATCH] Update errors.md to do case insensitive comparison --- docs/errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/errors.md b/docs/errors.md index 94a026e6b2e..bdcce4bafa9 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -35,7 +35,7 @@ catch (ODataError odataError) when (odataError.ResponseStatusCode == (int)HttpSt There are a few different types of errors that can occur during a network call. These most common error codes are defined in [GraphErrorCode.cs](../src/Microsoft.Graph/Enums/GraphErrorCode.cs). These can be checked by matching with the error code value as below. ```csharp -catch (ODataError odataError) when (odataError.Error.Code.Equals(GraphErrorCode.AccessDenied.ToString())) +catch (ODataError odataError) when (odataError.Error.Code.Equals(GraphErrorCode.AccessDenied.ToString(),StringComparison.OrdinalIgnoreCase)) { // Handle access denied error }