void ifError(void Function(String error, String message) callback) { if (this case ApiError<T> value) callback(value.error, value.message); }