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

Rss feed causing an error #38

Closed
JaredAAT opened this issue Dec 17, 2021 · 0 comments · Fixed by #39
Closed

Rss feed causing an error #38

JaredAAT opened this issue Dec 17, 2021 · 0 comments · Fixed by #39

Comments

@JaredAAT
Copy link
Contributor

Using latest rss-to-json: 2.0.2

This code is causing an error to be thrown:

const { parse } = require('rss-to-json');  

const abc = async () => {
    const b = await parse('https://status.aws.amazon.com/rss/apigateway-eu-west-2.rss').catch((err) => {console.log(err)});
    console.log(b)
}

abc()

The error:

TypeError: Cannot read property 'length' of undefined
at t.default in rss-to-json/dist/index.js — line 1

The RSS feed is, at the time of posting, returning:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title><![CDATA[Amazon API Gateway (London) Service Status]]></title>
    <link>http://status.aws.amazon.com/</link>
    <language>en-us</language>
    <lastBuildDate>Fri, 17 Dec 2021 00:05:40 PST</lastBuildDate>
    <generator>AWS Service Health Dashboard RSS Generator</generator>
    <description><![CDATA[Amazon API Gateway (London) Service Status]]></description>
    <ttl>5</ttl>
    <!-- You seem to care about knowing about your events, why not check out https://docs.aws.amazon.com/health/latest/ug/getting-started-api.html -->

	
  </channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant