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

Handled exceptions in python files #97

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Sai-ganesh-0004
Copy link

@Sai-ganesh-0004 Sai-ganesh-0004 commented Oct 19, 2024

Description

This update introduces exception handling for the concurrent execution of the FastAPI and Flask applications. The changes ensure that if either application fails to start, an error message is logged, helping to diagnose issues during startup. The motivation for this enhancement is to improve the reliability and maintainability of the application by providing clear logging of errors.

**Fixes #96

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

The following tests were conducted to verify the changes:

  • Both the FastAPI and Flask applications were started simultaneously using the updated script.

  • The applications were intentionally made to throw exceptions (e.g., by pointing to incorrect configurations) to verify that the error logging works correctly.

  • No other tests were run since this change pertains primarily to startup error handling.

  • Test A: Verified that both applications start without issues under normal conditions.

  • Test B: Confirmed that errors are logged when one of the applications fails to start.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Sai-ganesh-0004
Copy link
Author

Once check and tell me if I have to do something

@Devasy23 Devasy23 assigned Devasy23 and Sai-ganesh-0004 and unassigned Devasy23 Oct 19, 2024
@Devasy23 Devasy23 added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers level2 gssoc-extd hacktoberfest hacktoberfest-accepted labels Oct 19, 2024
@Sai-ganesh-0004
Copy link
Author

Can you update me

@devansh-shah-11
Copy link
Collaborator

Hi @Sai-ganesh-0004 ,
Thank you for the efforts - we will review and get back

@Sai-ganesh-0004
Copy link
Author

any updates

@Devasy23
Copy link
Owner

@devansh-shah-11 any updates?

@Sai-ganesh-0004
Copy link
Author

any updates @devansh-shah-11

Comment on lines -26 to +28
def Main_page():
def main_page():
Copy link
Owner

Choose a reason for hiding this comment

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

Why did you renamed the function?

testing/test_face_cycle.py Show resolved Hide resolved
@Devasy23
Copy link
Owner

Devasy23 commented Nov 3, 2024

@Sai-ganesh-0004 could you please solve this errors in tests.


=========================== short test summary info ============================
ERROR testing/test_database.py
ERROR testing/test_face_cycle.py - RecursionError: maximum recursion depth exceeded in comparison
ERROR testing/test_face_endpoints.py - RecursionError: maximum recursion depth exceeded in comparison
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 3 errors in 9.38s ===============================```

@SparshKhanna0001
Copy link

@Devasy23 upgrade this to level3, this deserves to be level3 due to extensive work that has to be done...!

@Devasy23
Copy link
Owner

Devasy23 commented Nov 9, 2024

@SparshKhanna0001 i understand your concern but it is already decided by mentors that it is level 2 but it all errors are solved then maybe we can give level 3.

@Sai-ganesh-0004 please complete the necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers gssoc-extd hacktoberfest hacktoberfest-accepted level2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception handling for all python files for better Response
4 participants