cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

429 rate limit errors without "error" tag

429 rate limit errors without "error" tag

Sam80
Helpful | Level 5

According to the API docs, rate limiting errors (429) will have the following format:

 

The Content-Type of the response can be JSON or plaintext. If it is JSON, it will be type RateLimitError.

 

I've recently seen an increasing number of reports from users of my app, using the Dropbox Python SDK, where 429 errors with content-type 'application/json' don't conform to the expected JSON structure. In particular, they don't contain an "error" tag, leading to exceptions when the SDK tries to deserialise them as RateLimitError in https://github.com/dropbox/dropbox-sdk-python/blob/487793dff3c5a8a3a76010799dc4803cabdb70f3/dropbox/...:

 

 

            err = None
            if res.headers.get('content-type') == 'application/json':
                err = stone_serializers.json_compat_obj_decode(
>                   RateLimitError_validator, res.json()['error'])
E               KeyError: 'error'

 

 

Has anything changed in the expected body of error responses?

 

3 Replies 3

Greg-DB
Dropbox Staff

Thanks for the report! We'll look into it.

Greg-DB
Dropbox Staff

The team has pushed out a change that should fix this. Please let us know if you're still seeing any instances of this now. Thanks!

Sam S.6
Explorer | Level 4

Thank you for the quick fix!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Sam S.6 Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?