commit b4185a6ef452fba47e481264af06e67524391584
parent b9a0a16a91c06c50a93f7ba3980c874016a32fb6
Author: Florian Dold <florian@dold.me>
Date: Tue, 2 Apr 2024 13:03:01 +0200
-error codes
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/packages/taler-util/src/taleruri.ts b/packages/taler-util/src/taleruri.ts
@@ -139,8 +139,8 @@ export function parseWithdrawUriWithError(s: string) {
const parts = pi.body.rest.split("/");
if (parts.length < 2) {
- return opKnownTalerFailure(TalerErrorCode.TALER_URI_NO_ENOUGH_COMPONENT, {
- code: TalerErrorCode.TALER_URI_NO_ENOUGH_COMPONENT,
+ return opKnownTalerFailure(TalerErrorCode.WALLET_TALER_URI_MALFORMED, {
+ code: TalerErrorCode.WALLET_TALER_URI_MALFORMED,
});
}
@@ -236,8 +236,8 @@ function parseProtoInfoWithError(s: string, action: string) {
!s.toLowerCase().startsWith("taler://") &&
!s.toLowerCase().startsWith("taler+http://")
) {
- return opKnownTalerFailure(TalerErrorCode.TALER_URI_PREFIX, {
- code: TalerErrorCode.TALER_URI_PREFIX,
+ return opKnownTalerFailure(TalerErrorCode.WALLET_TALER_URI_MALFORMED, {
+ code: TalerErrorCode.WALLET_TALER_URI_MALFORMED,
});
}
const pfxPlain = `taler://${action}/`;
@@ -253,8 +253,8 @@ function parseProtoInfoWithError(s: string, action: string) {
rest: s.substring(pfxHttp.length),
});
} else {
- return opKnownTalerFailure(TalerErrorCode.TALER_URI_UNKOWN_ACTION, {
- code: TalerErrorCode.TALER_URI_UNKOWN_ACTION,
+ return opKnownTalerFailure(TalerErrorCode.WALLET_TALER_URI_MALFORMED, {
+ code: TalerErrorCode.WALLET_TALER_URI_MALFORMED,
});
}
}