ExceptionMap property
Converts GrpcError
s to typed Exceptions
Implementation
static Map<String, GrpcErrorCallback> ExceptionMap =
<String, GrpcErrorCallback>{
Exceptions.PersistentSubscriptionFailed: (e) =>
PersistentSubscriptionFailedException.fromError(e),
Exceptions.PersistentSubscriptionDoesNotExist: (e) =>
PersistentSubscriptionNotFoundException.fromError(e),
Exceptions.PersistentSubscriptionExists: (e) =>
PersistentSubscriptionExistsException.fromError(e),
Exceptions.MaximumSubscribersReached: (e) =>
MaximumSubscribersReachedException.fromError(e),
Exceptions.PersistentSubscriptionDropped: (e) =>
PersistentSubscriptionDroppedException.fromError(e),
Code.UNKNOWN.name: _onUnknown,
};