-
Notifications
You must be signed in to change notification settings - Fork 388
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
When beer ratings are null #83
Comments
Ran into this issue too... looks like the beer API has a couple of blank entries at the end, scroll to the bottom you'll see the 'beers' with just an 'id' and no additional data: Guessing the API changed after Wes released the course. I ended up doing something similar, just skipping generation of a 'beer' into a node, in
|
Wound up submitting an issue for the API maintainers: Happy coding |
Looks like API endpoint was fixed and deployed, should be okay to close :) |
Confirming this is still an issue (or there is a new similar issue) as of today, but either workaround mentioned above will let you proceed with the tutorial! I tried to inspect the JSON output here: https://sampleapis.com/api-list/beers There seems to be a bunch of rogue data with email addresses and other junk starting at object id: 181 that get converted into Bad luck that every other API on the website seems to be working fine, and it's just the Beer API filtered for Ales. |
For anyone who comes across this in the future, here is a link to the current solution 🙂 |
My beers api response had an empty beer record, so I was getting this error:
TypeError: Cannot read property 'average' of null
With the code below.
I ended just replacing two line in the code, with the conditional code below. Not sure if this is the best solution, but it worked.
The text was updated successfully, but these errors were encountered: