You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// usually the error has a code and message, but occasionally not
169
-
if(!errorData.error)throwerror;
205
+
if(!errorData.error)throwerror;
170
206
171
-
const{ code, message }=errorData.error;
172
-
error.message=`Google API error - [${code}] ${message}`;
173
-
throwerror;
174
-
}
207
+
const{ code, message }=errorData.error;
208
+
error.message=`Google API error - [${code}] ${message}`;
209
+
throwerror;
210
+
}
175
211
176
-
if(_.get(error,'response.status')===403){
177
-
if('apiKey'inthis.auth){
178
-
thrownewError('Sheet is private. Use authentication or make public. (see https://github.com/theoephraim/node-google-spreadsheet#a-note-on-authentication for details)');
212
+
if(responseStatusCode===403){
213
+
if('apiKey'inthis.auth){
214
+
thrownewError('Sheet is private. Use authentication or make public. (see https://github.com/theoephraim/node-google-spreadsheet#a-note-on-authentication for details)');
0 commit comments