Skip to content

Return Array instead of Dict when responsing 429 code #828

@shenshaoyong

Description

@shenshaoyong

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS type and version:
  • Python version: python --version
  • pip version: pip --version
  • google-api-core version: pip show google-api-core
    google-api-core = "2.25.0" and google-api-core = "2.25.1"

When accessing Gemini with 200 code, the format of payload is Dict, but when getting 429 code, the format of payload changes to Array.
This causes the original processing logic changing.

Steps to reproduce

  1. Image
  2. ?

Code example

# example

Stack trace

# example

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions