Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Error fetching sheet #35

Closed
ryan-williams opened this issue Oct 4, 2015 · 3 comments
Closed

Error fetching sheet #35

ryan-williams opened this issue Oct 4, 2015 · 3 comments

Comments

@ryan-williams
Copy link

$ cat gsheet.js
#!/usr/bin/env node

var GoogleSpreadsheets = require("google-spreadsheets");

var key = process.argv[2];

console.log("sheet:", key);

GoogleSpreadsheets(
      {
        key: key
      },
      function(err, sheet) {
        console.log(err, sheet);
      }
);
$ gsheet.js 1Bb-SLy4E-alUUSJ68Qb5nNmZG6HsPbG2j6Ye_QZO77Y
sheet: 1Bb-SLy4E-alUUSJ68Qb5nNmZG6HsPbG2j6Ye_QZO77Y
[TypeError: Cannot read property 'title' of undefined] null

Trying to fetch this sheet.

@samcday
Copy link
Owner

samcday commented Oct 7, 2015

I think this is a dupe of #34?

@ryan-williams
Copy link
Author

Pretty similar: the sheet didn't have the right permissions, as you noted.

Can I rephrase this as: "Improve error message when fetching sheet with incorrect permissions"?

I filed this separately from #34 because it goes via a different API and gives a different, also unhelpful, error message to what I was hitting in #34.

@samcday
Copy link
Owner

samcday commented Nov 7, 2015

This issue is now fixed in 0.5.0 of the lib. If you try to access a non-public sheet without auth you'll get the error No access to that spreadsheet, check your auth..

@samcday samcday closed this as completed Nov 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants