github icon indicating copy to clipboard operation
github copied to clipboard

Notifications and discussions - parse error

Open magthe opened this issue 1 year ago • 2 comments

I haven't researched this in detail yet, but there seems to be a difference in the shape of notifications for PRs and for discussions.

Earlier today I had three notifications in my inbox, 2 from discussions and 1 from a PR. When trying to fetch all notifications I received this error:

ParseError "Error in $[0].subject.url: parsing URL failed, expected String, but encountered Null"

I marked one of the discussion notifications as done, ran my code again and got the same parse error. Then I marked the second discussion notification as done, and when I ran my code after that it happily parsed the response with a single PR notification.

magthe avatar Mar 07 '24 18:03 magthe

Now I've made a small change that solves the issue for me at least. This does go against the documentation, so arguably it should be pointed out to GitHub/Microsoft too.

My changes is here

magthe avatar Mar 09 '24 14:03 magthe

Yeah, also for GitHub actions in the notifications the subject url can be null. According to the published spec by github we are already not correct because subject "last comment url" is also often null, which this library apparently accepted.

maralorn avatar Sep 24 '24 15:09 maralorn