Errors

The Mural API can throw various errors. If it is expected that an error from the Mural API should be handled gracefully, an error will be serialized to the http response as a MuralServiceException with the following shape:


interface MuralServiceException {
  errorInstanceId: string,
  name: MURAL_ERROR_NAME, // identifier of the specific error type, see below
  message: string
  params: map<string, any> // params defined by the specific error type, see below
}

We have a number of specific MuralServiceException types, which are outlined below:

SignedAgreementRequiredException

Definition

interface SignedAgreementRequiredException extends MuralServiceException {
  name: "SignedAgreementRequiredException",
  message: "End user must accept Terms of Service",
  params: {
    organizationId: string 
  }
}

Expected next steps:

You should generate a new Terms of Service link using the hosted TOS link endpoint and display that to your user such that they can sign the Terms of Service.


PayoutQuoteExpiredException

Definition

interface PayoutQuoteExpiredException extends MuralServiceException {
  name: "PayoutQuoteExpiredException";
  message: "This payout request had an expired quote. The exchange rate has been automatically updated for the effected payouts. Please retry the payout to execute the payout request with the updated payouts.";
  params: {
    expiredQuotes: ExpiredQuote[];
  };
}

interface ExpiredQuote {
  payoutId: string;
  fiatCurrencyCode: string;
  previousRate: number; // represents 1 USD equivalent in the destination currency
  newRate: number; // represents 1 USD equivalent in the destination currency
  previousFiatAmount: number;
  newFiatAmount: number;
}

Expected next steps:

You can immediately turn around and execute the Payout Request again, or you can show this information to your user for them to take the next step.