Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: JSON parse error when event=pull_request and action=milestoned #223

Closed
1 task done
jamesyao-msft opened this issue Mar 24, 2023 · 2 comments · Fixed by #237
Closed
1 task done

[BUG]: JSON parse error when event=pull_request and action=milestoned #223

jamesyao-msft opened this issue Mar 24, 2023 · 2 comments · Fixed by #237
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@jamesyao-msft
Copy link

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) JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount) JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 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
@jamesyao-msft jamesyao-msft added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Mar 24, 2023
@jamesyao-msft
Copy link
Author

Root cause might be "milestoned" action was not handled in JSON converter. Consider making it not throw exception.

@JamieMagee
Copy link
Contributor

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

@JamieMagee JamieMagee added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants