silentErrorHandling function

void silentErrorHandling(
  1. AuthService authService
)

Implementation

void silentErrorHandling(AuthService authService) async {
  final errorHandler = AuthErrorHandler.silent(
    onError: (error) {
      // Just log, don't throw
      print('Silent error: ${error.message}');
    },
  );

  // This won't throw an exception
  await authService.signInWithEmailAndPassword(
    email: 'user@example.com',
    password: 'wrong',
    errorHandler: errorHandler,
  );

  print('Execution continues normally');
}