update error codes
This commit is contained in:
parent
c90b03ec57
commit
c5b25d1cbd
@ -127,7 +127,7 @@ runTest(async (t: GlobalTestState) => {
|
||||
faultInjected = true;
|
||||
console.log("injecting pay fault");
|
||||
const err: TalerErrorDetails = {
|
||||
code: TalerErrorCode.PAY_DB_FETCH_TRANSACTION_ERROR,
|
||||
code: TalerErrorCode.GENERIC_DB_COMMIT_FAILED_HARD,
|
||||
details: {},
|
||||
hint: "huh",
|
||||
message: "something went wrong",
|
||||
|
@ -647,7 +647,7 @@ async function processDownloadProposalImpl(
|
||||
);
|
||||
if (r.isError) {
|
||||
switch (r.talerErrorResponse.code) {
|
||||
case TalerErrorCode.ORDERS_ALREADY_CLAIMED:
|
||||
case TalerErrorCode.MERCHANT_POST_ORDERS_ID_CLAIM_ALREADY_CLAIMED:
|
||||
throw OperationFailedError.fromCode(
|
||||
TalerErrorCode.WALLET_ORDER_ALREADY_CLAIMED,
|
||||
"order already claimed (likely by other wallet)",
|
||||
|
@ -264,7 +264,7 @@ async function storeFailedRefund(
|
||||
if (p.abortStatus === AbortStatus.AbortRefund) {
|
||||
// Refund failed because the merchant didn't even try to deposit
|
||||
// the coin yet, so we try to refresh.
|
||||
if (r.exchange_code === TalerErrorCode.REFUND_DEPOSIT_NOT_FOUND) {
|
||||
if (r.exchange_code === TalerErrorCode.EXCHANGE_REFUND_DEPOSIT_NOT_FOUND) {
|
||||
const coin = await tx.get(Stores.coins, r.coin_pub);
|
||||
if (!coin) {
|
||||
logger.warn("coin not found, can't apply refund");
|
||||
|
@ -523,7 +523,7 @@ async function updateReserve(
|
||||
if (result.isError) {
|
||||
if (
|
||||
resp.status === 404 &&
|
||||
result.talerErrorResponse.code === TalerErrorCode.RESERVE_STATUS_UNKNOWN
|
||||
result.talerErrorResponse.code === TalerErrorCode.EXCHANGE_RESERVES_GET_STATUS_UNKNOWN
|
||||
) {
|
||||
ws.notify({
|
||||
type: NotificationType.ReserveNotYetFound,
|
||||
|
Loading…
Reference in New Issue
Block a user