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

Enhancement: Graceful Handling of Missing Controller Classes in GroupedEndpointsFromApp #718

Closed
wants to merge 2 commits into from

Conversation

zfhassaan
Copy link

Summary:

This pull request addresses an issue in the GroupedEndpointsFromApp class where an exception was thrown if a route's controller class couldn't be resolved. The existing code was modified to return null in such cases, allowing for a more graceful handling of the situation.

Changes Made:

The following changes have been made in this pull request:

Updated the code to return null if the route's controller class doesn't exist.

Motivation:

The original code was throwing an exception when the route's controller class couldn't be resolved, which could lead to unnecessary disruptions and confusion. By returning null instead of throwing an exception, the code now gracefully handles scenarios where the class is missing, without causing unexpected issues.

Testing:

The modified code has been tested with various route configurations, including cases where the controller class exists and where it doesn't. Unit tests have been added to ensure that the new behavior is correctly implemented and that the expected return values are achieved.

Additional Notes:

No other changes have been made to the codebase apart from the modifications mentioned above.

Small bug fix for if the class doesnt exist then it will return false else it will cause the error
@shalvah
Copy link
Contributor

shalvah commented Sep 7, 2023

Can you update the tests?

@zfhassaan
Copy link
Author

Ok.

@shalvah
Copy link
Contributor

shalvah commented Nov 21, 2023

Still got failing tests...

@zfhassaan
Copy link
Author

I'm occupied in job so dont have time to fix this. I'm closing this for now. Will create a new one later on

@zfhassaan zfhassaan closed this Nov 27, 2023
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

Successfully merging this pull request may close these issues.

3 participants