bcomnes / jsonfeed-to-rss

📡Convert a jsonfeed to an RSS 2.0 feed with iTunes extensions
https://jsonfeed-to-rss.netlify.com
MIT License
38 stars 12 forks source link

Keep Getting An Error #32

Open jackcooper04 opened 4 years ago

jackcooper04 commented 4 years ago

I have matched the format of the JSON Feed in your example yet when I attempt to convert I get this error UnhandledPromiseRejectionWarning: Error: jsonfeed-to-atom: JSON feed version 1 required

bcomnes commented 4 years ago

A valid json feed requires a version field, but it looks like that test is overly strict and needs to be updated for version 1.1.

I’ll get a patch in soon

Sent from my mobile

On Oct 29, 2020, at 6:37 AM, Jack Cooper notifications@github.com wrote:

 I have matched the format of the JSON Feed in your example yet when I attempt to convert I get this error UnhandledPromiseRejectionWarning: Error: jsonfeed-to-atom: JSON feed version 1 required

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

bcomnes commented 4 years ago

Digging in a little more:

https://github.com/bcomnes/jsonfeed-to-rss/blob/ebbbfb7180e27b99b25766d92dddea6f7db7319a/jsonfeed-to-rss-object.js#L41-L44

jsonfeed-to-rss will refuse to serialize an invalid jsonfeed, meaning if there are any missing required fields it will throw that error.

In which case, the object it received was lacking this field:

"version":"https://jsonfeed.org/version/1",

The version string check is strict because when I wrote it there was only one option. I need to update the lib to support 1.1 of the spec which will have a new version string. Planning on doing a major version bump and only supporting 1.1 in that version forward. Luckily migrating feeds to the new version comes down to putting an array around author fields and pluralizing the key.

If you have a gist or repo example I could look at I can dig in further. I'm guessing from the promise error that maybe data isn't quite making it to the lib due to some promise chain somewhere?

ralyodio commented 2 years ago

Still doesn't work. I get the same error using jsonfeed 1.1

bcomnes commented 2 years ago

I need an example feed that causes problems to do anything with this issue.