kom-senapati / bot-verse

Bot Verse is an open-source platform for creating, managing, and sharing AI chatbots. It features secure authentication, chatbot CRUD operations, public bot sharing, and pre-made system bots for common tasks.
MIT License
28 stars 47 forks source link

πŸš€ Feature: Enhanced Error Handling for API Calls and API Key Validation #201

Open Anushka-Pote opened 5 hours ago

Anushka-Pote commented 5 hours ago

πŸ”– Feature description

To improve robustness, this issue focuses on enhancing error handling mechanisms across all API calls in the chat_with_chatbot function. This includes catching network-related issues, providing meaningful error messages, and validating that the API key is present before making any requests.

🎀 Why is this feature needed ?

To improve robustness, this issue focuses on enhancing error handling mechanisms across all API calls in the chat_with_chatbot function. This includes catching network-related issues, providing meaningful error messages, and validating that the API key is present before making any requests.

✌️ How do you aim to achieve this?

API Key Validation: Check that the apiKey variable is not empty before any API requests are made, and raise an error if it is missing.

Error Handling for Network Requests: Add exception handling to catch network errors for all API calls, returning a clear error message in case of a failure.

πŸ”„οΈ Additional Information

No response

πŸ‘€ Have you spent some time to check if this feature request has been raised before?

Are you willing to submit PR?

Yes I am willing to submit a PR!

github-actions[bot] commented 5 hours ago

Thank you for creating this issue! πŸŽ‰ We'll look into it as soon as possible.

kom-senapati commented 2 hours ago

I don't think this one is necessary. It can be handled on the client side.

Anushka-Pote commented 28 minutes ago

Ohh.. I have worked with APIs before and thought Error handling and Logging of API calls etc like functions are crucial for Debugging issues, so thought to mention

kom-senapati commented 13 minutes ago

You can work then