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

detect_provider method raises ArgumentError #468

Closed
vikkanaev opened this issue Feb 28, 2024 · 2 comments · Fixed by #469
Closed

detect_provider method raises ArgumentError #468

vikkanaev opened this issue Feb 28, 2024 · 2 comments · Fixed by #469
Assignees
Labels

Comments

@vikkanaev
Copy link

Describe the bug
detect_provider method raises ArgumentError

To Reproduce

# ./test_run.rb file
require "nylas"

api_key = ENV["NYLAS_APP_KEY"]
nylas = Nylas::Client.new(api_key: api_key)
query_params = { email: "qwe@gmail.com" }

nylas.auth.detect_provider(query_params)

# cli
❯ ruby ./test_run.rb
/Users/some_name/.rvm/gems/ruby-3.1.3/gems/nylas-6.0.2/lib/nylas/resources/auth.rb:163:in `build_query': wrong number of arguments (given 2, expected 1) (ArgumentError)
        from /Users/some_name/.rvm/gems/ruby-3.1.3/gems/nylas-6.0.2/lib/nylas/handler/http_client.rb:214:in `build_url'
        from /Users/some_name/.rvm/gems/ruby-3.1.3/gems/nylas-6.0.2/lib/nylas/handler/http_client.rb:95:in `build_request'
        from /Users/some_name/.rvm/gems/ruby-3.1.3/gems/nylas-6.0.2/lib/nylas/handler/http_client.rb:34:in `execute'
        from /Users/some_name/.rvm/gems/ruby-3.1.3/gems/nylas-6.0.2/lib/nylas/handler/api_operations.rb:68:in `post'
        from /Users/some_name/.rvm/gems/ruby-3.1.3/gems/nylas-6.0.2/lib/nylas/resources/auth.rb:107:in `detect_provider'
        from ./test_run.rb:6:in `<main>'

Expected behavior
It should works as described in doc https://developer.nylas.com/docs/api/v3/admin/#post-/v3/providers/detect

SDK Version:
Ruby 3.1.3
Nylas: 6.0.2

Additional context

@vikkanaev vikkanaev added the bug label Feb 28, 2024
@atejada
Copy link
Contributor

atejada commented Feb 28, 2024

Thanks @vikkanaev we will fix it and let you know 😃

@mrashed-dev
Copy link
Contributor

@atejada provided the fix and it will be included in the next update, releasing very soon!

mrashed-dev added a commit that referenced this issue Mar 5, 2024
# Changelog
* Improved message sending and draft create/update performance (#470)
* Change default timeout to match API (90 seconds) (#471)
* Fixed error when invoking `Auth.detect_provider` (#469, #468)
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.

3 participants