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

Nylas::CalendarCollection.availability returns Nylas::InvalidRequest when :round_robin parameter is nil #373

Closed
kwayebopp opened this issue Jul 13, 2022 · 2 comments · Fixed by #375
Assignees
Labels

Comments

@kwayebopp
Copy link

kwayebopp commented Jul 13, 2022

Describe the bug
Using nil as the value for the :round_robin parameter returns a Nylas::InvalidRequest error.

To Reproduce
Simply try calling the availability function on a Nylas::CalendarCollection. After looking through the codebase, :round_robin appears to be nil by default, so I think the bug should surface with whatever parameters you use.

nylas =  Nylas::API.new(...)
nylas.calendars.availability(
  #params go here
)

Expected behavior
As per the developer docs, I expected that using round_robin: nil would return collective availability.

SDK Version:
5.11.0

Additional context

@kwayebopp kwayebopp added the bug label Jul 13, 2022
@kwayebopp kwayebopp changed the title Nylas::CalendarCollection.availability should be able to accept nil for :round_robin parameter Nylas::CalendarCollection.availability returns Nylas::InvalidRequest when :round_robin parameter is nil Jul 13, 2022
@mrashed-dev
Copy link
Contributor

@kwayebopp thanks for opening this issue, we will take a look and provide an update as soon as we can!

@mrashed-dev mrashed-dev self-assigned this Jul 15, 2022
@mrashed-dev mrashed-dev linked a pull request Jul 26, 2022 that will close this issue
@mrashed-dev
Copy link
Contributor

Thanks for your patience @kwayebopp. After talking to the availability team, it seems the documentation is off. round_robin is optional, but null is not a valid value. Omitting the round_robin field will yield a successful result with collective availability. Sending null will return an error.

I opened a PR to address this, now we just omit the field if it's left to nil. We also opened an internal ticket to fix the docs to reflect this. Thanks again for spotting and reporting this issue!

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

Successfully merging a pull request may close this issue.

2 participants