Skip to content

[Error Handling Attempt]: Do Not Merge#14

Open
SLRAM wants to merge 5 commits intomainfrom
feat/error-handling
Open

[Error Handling Attempt]: Do Not Merge#14
SLRAM wants to merge 5 commits intomainfrom
feat/error-handling

Conversation

@SLRAM
Copy link
Owner

@SLRAM SLRAM commented Jul 16, 2024

In this PR I have:

  • Created a FirebaseError Protocol to allow for conformance from FirebaseAuthError, FirebaseFirestoreError, FirebaseStorageError, and ImageProcessingError. ImageProcessingError is not an error type that comes from Firebase.
  • Created helper functions within an extension of NSError to allow for retrieval of FirebaseAuthError, FirebaseFirestoreError, and FirebaseStorageError types from async functions.

Intention:

  • My goal here is to allow for error handling for errors received from Firebase along with other custom local errors in a way that my functions can return any of these types and display a message to the user. I am unsure of the best approach to go about this handling. My assumtion is to conform all of these different errors into one custom type and work with that custom type.
  • Along with this, the intention is also to prevent having multiple catch patterns for any do/catch statement. I am aiming to only need one catch.
Avoid Goal

@SLRAM SLRAM force-pushed the feat/error-handling branch from 01e2844 to 906cf57 Compare July 17, 2024 03:04
@SLRAM SLRAM force-pushed the feat/error-handling branch from 4e00a09 to 835b807 Compare November 10, 2024 04:05
@SLRAM SLRAM force-pushed the feat/error-handling branch from 93b0d93 to 05d080e Compare November 11, 2024 19:26
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.

1 participant