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

Update mongodb.py #258

Merged
merged 1 commit into from
Jan 12, 2025
Merged

Conversation

Mayur-Pagote
Copy link
Contributor

@Mayur-Pagote Mayur-Pagote commented Jan 11, 2025

Closes: #257

  • Title: Add Error Handling to mongodb.py (UserManagement System) issue
  • Your Name: Mayur Pagote

Describe the add-ons or changes you've made 📃

I have made changes to mongodb.py in order to make the user management system more reliable. I have add some key error-handling improvements:

Database Connection Issues: We’ll wrap the database connection code in a try-except block to catch any connection failures and log errors for easier debugging.

Database Operation Errors: For operations like inserting or retrieving data, we’ll add error handling to catch issues such as duplicate entries or network problems, and provide clear error messages or logs.

Input Validation: We’ll introduce checks for invalid inputs, such as incorrect age formats or missing fields, and ensure the system raises an error or logs the issue when something isn’t right.

Checklist: ☑️

  • My code follows the Contributing Guidelines & Code of Conduct of this project.
  • This PR does not contain plagiarized content.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • My changes generate no new warnings.

Copy link

Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

Copy link
Owner

@Avdhesh-Varshney Avdhesh-Varshney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.

But Link your issue properly.

@Mayur-Pagote
Copy link
Contributor Author

But Link your issue properly?

I didn't understand, @Avdhesh-Varshney.

@Avdhesh-Varshney
Copy link
Owner

But Link your issue properly?

I didn't understand, @Avdhesh-Varshney.

I've updated it!

Copy link
Collaborator

@jindalpriyanshu101 jindalpriyanshu101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, nice work

@Avdhesh-Varshney Avdhesh-Varshney merged commit 525e9a3 into Avdhesh-Varshney:main Jan 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Error Handling to mongodb.py (UserManagement System)
3 participants