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.
PayinMinimumNotMetError
Definition:
export class PayinMinimumNotMetError extends MuralServiceException {
name = 'PayinMinimumNotMetError';
message: `Payin amount less fees must be greater than ${params.minimumFiatAmount.fiatAmount} ${params.minimumFiatAmount.fiatCurrencyCode}. Net payout amount provided was ${(params.providedFiatAmount.fiatAmount - params.fees.fiatAmount)} ${params.providedFiatAmount.fiatCurrencyCode}`;
params: {
minimumFiatAmount: FiatAmount;
providedFiatAmount: FiatAmount;
fees: FiatAmount;
exchangeRate?: number;
};
}
export class FiatAmount {
fiatAmount: number;
fiatCurrencyCode: string;
}
Expected next steps:
You should make a new payin request where the payin amount less fees is greater than the minimum fiat amount.
PayoutMinimumNotMetError
Definition:
export class PayoutMinimumNotMetError extends MuralServiceException {
name = 'PayoutMinimumNotMetError';
message: `Payout amount less fees must be greater than ${params.minimumFiatAmount.fiatAmount} ${params.minimumFiatAmount.fiatCurrencyCode}. Net payout amount provided was ${(params.providedFiatAmount.fiatAmount - params.fees.fiatAmount)} ${params.providedFiatAmount.fiatCurrencyCode}`;
params: {
minimumFiatAmount: FiatAmount;
providedFiatAmount: FiatAmount;
fees: FiatAmount;
exchangeRate?: number;
};
}
export class FiatAmount {
fiatAmount: number;
fiatCurrencyCode: string;
}
Expected next steps:
You should make a new payout request where the payout amount less fees is greater than the minimum fiat amount.
Updated about 1 month ago