-
Notifications
You must be signed in to change notification settings - Fork 22
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
[BUG]: deepFindPathToProperty() throws TypeError if graphql response field is null #58
Comments
Added a minimal reproducible example and the corresponding log output. |
I had a quick look at this. Here is a good place to start - the conditional on line 26 could be predicated by a null check on However, I’m not 100% clear on what side effects that might cause so well need some coverage on this scenario as well - just to ensure this change is doing what is expected. |
That's what I also thought. My suggested PR #59 adds a null check. |
Adopt non-recursive path calculation. Fixes octokit#58
I'm getting same issue when I try to do a query without enough permissions. const iterator = await this.graphql.paginate.iterator(query, { ent })
let page_check_done = false
for await (const result of iterator) {
const orgs = result.enterprise.organizations.nodes it blows up with:
is there a chance for a fix? |
Previously the `deepFindPathToProperty` function would occasionally fail with `TypeError: Cannot read properties of null (reading 'hasOwnProperty')`. This change fixes that by adding a null check to the `findPaginatedResourcePath` function. Resolves octokit#58
🎉 This issue has been resolved in version 5.2.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What happened?
Some times a graphql response fields have value null. This causes currentValue.hasOwnProperty(searchProp) to throw
TypeError: Cannot read properties of null (reading 'hasOwnProperty')
error.Minimal Reproducible Example
Versions
@octokit/[email protected]
[email protected]
Node v16.17.0
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: