[BUG]: JSON parse error when event=pull_request and action=milestoned
jamesyao-msft opened this issue · 2 comments
What happened?
Message:
System.Text.Json.JsonException : The JSON value could not be converted to Octokit.Webhooks.Events.PullRequestEvent. Path: $ | LineNumber: 0 | BytePositionInLine: 30483.
Stack Trace:
WebhookConverter1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) JsonConverter
1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount) JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 json, JsonTypeInfo jsonTypeInfo)
JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
WebhookEventProcessor.DeserializeWebhookEvent(WebhookHeaders headers, String body)
Versions
Octokit.Webhooks.net v1.3.5
Relevant log output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Root cause might be "milestoned" action was not handled in JSON converter. Consider making it not throw exception.
Thanks for the bug report. It looks like it was added to https://github.com/github/rest-api-description recently. I usually pull types from https://github.com/octokit/webhooks, but it hasn't been updated yet.
For not throwing, this should be resolved with #98