[BUG]: WorkflowJobCompletedEvent cannot be Deserialized if the job was not successful
mattdjones opened this issue · 0 comments
mattdjones commented
What happened?
A workflow job ran and a step failed - a workflow_job.completed event is raised with the conclusion "failure" and in the steps
collection the status of one of the steps is in_progress
this status is not included in the WorkflowJobStepConclusion enum which causes the deserialization to fail and throw an error.
Versions
Octokit.Webhooks.AspNetCore 1.3.5
Relevant log output
System.ArgumentException: Requested value 'in_progress' 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 183
Code of Conduct
- I agree to follow this project's Code of Conduct