async tryAction(promise, failureExpected, message) {
    this.props.error = null;

    try {
      this.props.result = await promise;
    } catch (e) {
      this.props.error = e;
    }

    if (failureExpected && !this.props.error) {
      throw new Error(message || "Expected action to fail");
    }

    if (!failureExpected && this.props.error) {
      throw this.props.error;
    }
  }
Await the promise provided in the argument, and throw an error depending
on whether we expect the action to succeed or not

@param  {Promise} promise
@param  {boolean} failureExpected
@param  {string} [message] optional custom error message
@throws If expectations are not met