Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 7ec64ff

Browse files
committed
Ignore case of X-GitHub-Request-Id
1 parent 21b916f commit 7ec64ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitHub.Exports/ExceptionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Linq;
23
using Octokit;
34

45
namespace GitHub.Extensions
@@ -9,8 +10,7 @@ public static class ApiExceptionExtensions
910
public static bool IsGitHubApiException(this Exception ex)
1011
{
1112
var apiex = ex as ApiException;
12-
return apiex?.HttpResponse?.Headers.ContainsKey(GithubHeader) ?? false;
13+
return apiex?.HttpResponse?.Headers.Keys.Contains(GithubHeader, StringComparer.OrdinalIgnoreCase) ?? false;
1314
}
1415
}
15-
1616
}

0 commit comments

Comments
 (0)