Called whenever the bloc encounters an error
void onError(R bloc, StateError error, {String? event}) {}