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

Error when calling accounts.ids #378

Closed
f1sherman opened this issue Aug 4, 2022 · 7 comments · Fixed by #380 or #381
Closed

Error when calling accounts.ids #378

f1sherman opened this issue Aug 4, 2022 · 7 comments · Fixed by #380 or #381
Assignees
Labels

Comments

@f1sherman
Copy link

Describe the bug
When calling #ids on a collection of accounts, we get the error Nylas::InvalidRequest: Unexpected query parameters set(['view'])

To Reproduce

> Nylas::API.new(app_id: <elided>, app_secret: <elided>).accounts.ids
Nylas::InvalidRequest: Unexpected query parameters set(['view'])
from /app/vendor/bundle/ruby/3.1.0/gems/nylas-5.12.0/lib/nylas/http_client.rb:227:in `handle_anticipated_failure_mode'

Expected behavior
The method should return the ids of the accounts

SDK Version:
5.12.0

@f1sherman f1sherman added the bug label Aug 4, 2022
@mrashed-dev mrashed-dev self-assigned this Aug 4, 2022
@mrashed-dev
Copy link
Contributor

mrashed-dev commented Aug 4, 2022

Hey @f1sherman thanks for opening this issue. Currently the API does not support the id view on all the different collections, like Accounts. However, we'll enable this feature on the SDK side for all of these collections. I'll update you once we have the feature ready for release.

@f1sherman
Copy link
Author

Sounds great, thanks for the quick response!

@mrashed-dev
Copy link
Contributor

@f1sherman Thanks again for your patience, the PR just went up! Now all collections, including those not supporting view=ids on the API side like Account, will work.

@f1sherman
Copy link
Author

Yay, thank you!

@f1sherman
Copy link
Author

Sorry, one more (potentially related) question: I'm getting the same error when calling accounts.count. Should I file a separate issue for that?

@mrashed-dev
Copy link
Contributor

@f1sherman No need! I'll push an update to fix this as well, thanks for pointing that out.

@mrashed-dev
Copy link
Contributor

Hey @f1sherman! That support has also been added and released in v5.12.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants