I made a https call in cloud functions and threw an error if a condition fails, in flutter i handled it successfully and it shows me this : PlatformException(functionsError, Cloud function failed with exception., {code: FAILED_PRECONDITION, details: null, message: Error: Your card was declined.})
but i want to know how i can get just the message part to display to the user? so far i already tried e.message but that didnt work
CloudFunctions(app: Firebase.app(), region: 'asia-southeast2')
.getHttpsCallable(functionName: 'addPayment')
.call({
'paymentMethodId': paymentMethod.id,
'userid': FirebaseAuth.instance.currentUser.uid,
}).catchError((e) => print('ERROR $e'));
this is my function