Open ebot64 opened 4 years ago
Thanks for pointing out the implementation change🙂.
Instead of chaining with then()
and catchError()
, could you try try ... catch
?
Referencing an example from cloud_functions package :
try {
final HttpsCallableResult result = await callable.call(
<String, dynamic>{
'message': 'hello world!',
'count': _responseCount,
},
);
print(result.data);
});
} on CloudFunctionsException catch (e) {
print('caught firebase functions exception');
print(e.code);
print(e.message);
print(e.details);
} catch (e) {
print('caught generic exception');
print(e);
}
First of all, thank you for this cloud function CRUD example. The CloudFunctions.instance.call has changed so I changed your implementation of the following code
to this
With this, the new user is added to firestore as expected, but I am having this Platform exception. What can be the cause?