addError method

bool addError(
  1. int id,
  2. HttpError error
)

Allows to add an error to an already added HttpInteraction, returns true on success.

This also notifies the listeners of this bucket.

Implementation

bool addError(int id, HttpError error) {
  var interaction = getHttpInteraction(id);
  if (interaction != null) {
    interaction.error = error;
    notifyListeners();
    return true;
  }
  return false;
}