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

Gemini 503 #50

Closed
appatalks opened this issue Mar 12, 2024 · 1 comment
Closed

Gemini 503 #50

appatalks opened this issue Mar 12, 2024 · 1 comment

Comments

@appatalks
Copy link
Owner

{
  "error": {
    "code": 503,
    "message": "The model is overloaded. Please try again later.",
    "status": "UNAVAILABLE"
  }
}
@appatalks
Copy link
Owner Author

Testing with

            .then(response => {
            if (!response.ok) { // Check if the response status is not OK (e.g., 503, 404, etc.)
                if (response.status === 503) {
                    // Handle specific 503 error
                    return Promise.reject(new Error('Error: 503 - The model is overloaded. Please try again later.'));
                } else {
                    // Handle other errors
                    return Promise.reject(new Error('Error handling response.'));
                    console.error("Error handling response", error);
                }
            }
                return response.json();
            })

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

No branches or pull requests

1 participant