Closed Nana-Kwame-bot closed 1 year ago
Where exactly are you not able to catch these errors? It seems the me they're passed on in the code: https://github.com/cachapa/firedart/blob/master/lib/firestore/firestore_gateway.dart#L247
Does this mean I can import it? What's the path because when I try to catch GrpcError
, intellisense can't help me add it to the list of imports. What's the path to import? Please help me out.
when I write this if (error is GrpcError) {}
I get this error
The name 'GrpcError' isn't defined, so it can't be used in an 'is' expression.
Try changing the name to the name of an existing type, or creating a type with the name 'GrpcError'
I think I have imported the gateway file though like this import 'package:firedart/firestore/firestore_gateway.dart';
I see the problem now. GrpcError is part of the grpc
package, which you'd have to import manually to be able to reference it.
I will add an export directive so that class becomes directly available from Firedart, and it should autocomplete just fine.
Hello, I would like to be able to handle errors on my end, but I can't seem to catch GrpcErrors and it's making things difficult. This is an awesome package and it has some limitations but at least let us handle the limitations. I would like to try to handle the closed streams and failed writes by calling the required methods again if need be. Showing users a readable error is also very important but I just can't do that. Please make it and any other exceptions public.