This PR addresses the issue where if the UID of a mosque is not found, the user should be removed or kicked out without an error in the application.
Description
Added MosqueFailure and MosqueNotFoundFailure classes to handle specific mosque-related errors.
Updated Api.dart to catch Dio 404 errors and throw MosqueNotFoundFailure.
Modified mosque_manager.dart to handle MosqueFailure errors specifically. If a MosqueNotFoundFailure is encountered, the user is removed from the mosque without throwing an error, ensuring a smooth user experience.
Tests
π§ͺ Use case 1
π¬ Description:
When attempting to fetch a mosque by UID that does not exist, the application should catch the error, remove the user from the mosque context, and notify listeners without displaying an error message.
π· Screenshots or GIFs (if applicable):
N/A
Checklist:
[x] Coding Standards: I have reviewed my code to ensure it follows the project's coding standards.
[x] Testing: I have tested the changes and they work as expected.
[x] Merge Conflicts: I have resolved any merge conflicts with the latest main/development branch.
[x] Branch Status: The branch is up-to-date with the target branch (main/development).
π Summary
This PR addresses the issue where if the UID of a mosque is not found, the user should be removed or kicked out without an error in the application.
Description
MosqueFailure
andMosqueNotFoundFailure
classes to handle specific mosque-related errors.Api.dart
to catch Dio 404 errors and throwMosqueNotFoundFailure
.mosque_manager.dart
to handleMosqueFailure
errors specifically. If aMosqueNotFoundFailure
is encountered, the user is removed from the mosque without throwing an error, ensuring a smooth user experience.Tests
π§ͺ Use case 1
π¬ Description: When attempting to fetch a mosque by UID that does not exist, the application should catch the error, remove the user from the mosque context, and notify listeners without displaying an error message.
π· Screenshots or GIFs (if applicable): N/A
Checklist: