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

NoMethodError raised when dropbox responds with 429 #99

Open
senid231 opened this issue Jun 21, 2023 · 0 comments · May be fixed by #100
Open

NoMethodError raised when dropbox responds with 429 #99

senid231 opened this issue Jun 21, 2023 · 0 comments · May be fixed by #100

Comments

@senid231
Copy link

Description

Looks like Dropbox may respond with a 429 status code and no body or content type is not JSON during file chunks upload.
In this case gem failed with NoMethodError

Gem version: 0.1.21

Backtrace

NoMethodError: undefined method `[]' for nil:NilClass
  from dropbox_api/endpoints/base.rb:47:in `process_response'
  from dropbox_api/endpoints/content_upload.rb:23:in `perform_request'
  from dropbox_api/endpoints/files/upload_session_start.rb:31:in `block in <class:UploadSessionStart>'
  from dropbox_api/client.rb:36:in `block in add_endpoint'
  from dropbox_api/chunked_uploader.rb:19:in `start'
  from dropbox_api/endpoints/virtual/upload_by_chunks.rb:45:in `upload_by_chunks'

dropbox_api/endpoints/base.rb:47

45      when 429
46        error = DropboxApi::Errors::TooManyRequestsError.build(
47          raw_response.env[:api_result]['error_summary'],
48          raw_response.env[:api_result]['error']['reason']
@BigG1947 BigG1947 linked a pull request Jun 29, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant