onFailure method
Calls the provided callback if the result is a failure.
callback is the function to be called with the error message if the result is a failure.
Implementation
@override
void onFailure(void Function(ErrorMessage errorMessage) callback) {}