-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Status: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseStatus: TriageThis is being looked at and prioritizedThis is being looked at and prioritizedType: BugSomething isn't working as documentedSomething isn't working as documented
Description
What happened?
Parsing a CheckRunEventPayload for an Enterprise-owned app results in an ArgumentException.
SimpleJsonSerializer serializer = new();
var payload = serializer .Deserialize<CheckRunEventPayload>( json );Versions
Octokit.net 14.0.0, net7.0
Relevant log output
System.ArgumentException: Requested value 'enterprise' was not found.
at System.Enum.TryParseByName(RuntimeType enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, UInt64& result)
at System.Enum.TryParseInt32Enum(RuntimeType enumType, ReadOnlySpan`1 value, Int32 minInclusive, Int32 maxInclusive, Boolean ignoreCase, Boolean throwOnFailure, TypeCode type, Int32& result)
at System.Enum.TryParse(Type enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, Object& result)
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.<>c__DisplayClass7_0.<DeserializeEnumHelper>b__1(Object v) in /home/runner/work/octokit.net/octokit.net/Octokit/Http/SimpleJsonSerializer.cs:line 137
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeEnumHelper(String value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/Http/SimpleJsonSerializer.cs:line 137
at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/Http/SimpleJsonSerializer.cs:line 160
at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/SimpleJson.cs:line 1494
at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/Http/SimpleJsonSerializer.cs:line 205
at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/SimpleJson.cs:line 1494
at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/Http/SimpleJsonSerializer.cs:line 205
at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/SimpleJson.cs:line 1494
at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/Http/SimpleJsonSerializer.cs:line 205
at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/SimpleJson.cs:line 1494
at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /home/runner/work/octokit.net/octokit.net/Octokit/Http/SimpleJsonSerializer.cs:line 205
at Octokit.SimpleJson.DeserializeObject(String json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) in /home/runner/work/octokit.net/octokit.net/Octokit/SimpleJson.cs:line 590
at Octokit.SimpleJson.DeserializeObject[T](String json, IJsonSerializerStrategy jsonSerializerStrategy) in /home/runner/work/octokit.net/octokit.net/Octokit/SimpleJson.cs:line 602
at Octokit.Internal.SimpleJsonSerializer.Deserialize[T](String json) in /home/runner/work/octokit.net/octokit.net/Octokit/Http/SimpleJsonSerializer.cs:line 22Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Status: StaleUsed by stalebot to clean houseUsed by stalebot to clean houseStatus: TriageThis is being looked at and prioritizedThis is being looked at and prioritizedType: BugSomething isn't working as documentedSomething isn't working as documented
Type
Projects
Status
✅ Done