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

GAS V8 runtime bug #25

Open
Rohed opened this issue Apr 27, 2020 · 0 comments
Open

GAS V8 runtime bug #25

Rohed opened this issue Apr 27, 2020 · 0 comments

Comments

@Rohed
Copy link

Rohed commented Apr 27, 2020

Switched to V8 Runtime and getting a bug where when, requesting to an endpoint which would normally return 'null' the whole script crashes with the 'Error connecting to Google Server'.

Well I loaded the library locally and this fix seems to do the job
baseClass_.getData = function (path, optQueryParameters) {
// Send request
// noinspection JSAnnotator
var [res] = FirebaseApp_._buildAllRequests([
{
method: 'get',
path: path,
optQueryParameters: optQueryParameters,
},
], this);

// Throw error
if (res instanceof Error) {
throw res;
}

if(res){
return res;
}
};

TLDR: dont return anything if the value to be returned is null.

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

No branches or pull requests

1 participant