Skip to content

Commit 58b8f2b

Browse files
authored
Merge branch 'master' into dotnet-payment-update
2 parents f9522bb + b8ce9d3 commit 58b8f2b

File tree

9 files changed

+44
-4
lines changed

9 files changed

+44
-4
lines changed

cli/src/libindy/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ pub enum ErrorCode
171171

172172
// Insufficient funds on inputs
173173
PaymentInsufficientFundsError = 702,
174+
175+
// No such source on a ledger
176+
PaymentSourceDoesNotExistError = 703
174177
}
175178

176179
impl ErrorCode {
@@ -229,6 +232,7 @@ impl ErrorCode {
229232
PaymentUnknownMethodError => "Unknown payment method was given",
230233
PaymentIncompatibleMethodsError => "Multiple different payment methods were specified",
231234
PaymentInsufficientFundsError => "Insufficient funds on inputs",
235+
PaymentSourceDoesNotExistError => "No such source found",
232236
}
233237
}
234238
}

libindy/include/indy_mod.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ typedef enum
156156
PaymentIncompatibleMethodsError = 701,
157157

158158
// Insufficient funds on inputs
159-
PaymentInsufficientFundsError = 702
159+
PaymentInsufficientFundsError = 702,
160+
161+
// No such source on a ledger
162+
PaymentSourceDoesNotExistError = 703
160163

161164
} indy_error_t;
162165

libindy/src/api/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,7 @@ pub enum ErrorCode
214214

215215
// Insufficient funds on inputs
216216
PaymentInsufficientFundsError = 702,
217+
218+
// No such source on a ledger
219+
PaymentSourceDoesNotExistError = 703
217220
}

wrappers/ios/libindy-pod/Indy/Wrapper/IndyErrors.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,8 @@ typedef NS_ENUM(NSInteger, IndyErrorCode)
155155
PaymentIncompatibleMethodsError = 701,
156156

157157
// Insufficient funds on inputs
158-
PaymentInsufficientFundsError = 702
158+
PaymentInsufficientFundsError = 702,
159+
160+
// No such source on a ledger
161+
PaymentSourceDoesNotExistError = 703
159162
};

wrappers/java/src/main/java/org/hyperledger/indy/sdk/ErrorCode.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ public enum ErrorCode {
283283
* Insufficient funds on inputs
284284
*/
285285
InsufficientFundsError(702),
286+
287+
/**
288+
* No such source on a ledger
289+
*/
290+
PaymentSourceDoesNotExistError(703),
286291
;
287292

288293
private int value;

wrappers/java/src/main/java/org/hyperledger/indy/sdk/IndyException.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ public static IndyException fromSdkError(int sdkErrorCode) {
139139
return new IncompatiblePaymentException();
140140
case InsufficientFundsError:
141141
return new InsufficientFundsException();
142+
case PaymentSourceDoesNotExistError:
143+
return new PaymentSourceDoesNotExistException();
142144
default:
143145
String message = String.format("An unmapped error with the code '%s' was returned by the SDK.", sdkErrorCode);
144146
return new IndyException(message, sdkErrorCode);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.hyperledger.indy.sdk.payments;
2+
3+
import org.hyperledger.indy.sdk.ErrorCode;
4+
import org.hyperledger.indy.sdk.IndyException;
5+
6+
public class PaymentSourceDoesNotExistException extends IndyException {
7+
private static final long serialVersionUID = -5009466707967765943L;
8+
private static final String message = "No such source found";
9+
10+
/**
11+
* Initializes a new {@link PaymentSourceDoesNotExistException} with the specified message.
12+
*/
13+
public PaymentSourceDoesNotExistException() {
14+
super(message, ErrorCode.PaymentSourceDoesNotExistError.value());
15+
}
16+
}

wrappers/nodejs/codegen/api.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
"c600": "DidAlreadyExistsError",
5050
"c700": "PaymentUnknownMethodError",
5151
"c701": "PaymentIncompatibleMethodsError",
52-
"c702": "PaymentInsufficientFundsError"
52+
"c702": "PaymentInsufficientFundsError",
53+
"c703": "PaymentSourceDoesNotExistError"
5354
},
5455
"functions": {
5556
"indy_issuer_create_schema": {

wrappers/python/indy/error.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ class ErrorCode(IntEnum):
155155
PaymentIncompatibleMethodsError = 701,
156156

157157
# Insufficient funds on inputs
158-
PaymentInsufficientFundsError = 702
158+
PaymentInsufficientFundsError = 702,
159+
160+
# No such source on a ledger
161+
PaymentSourceDoesNotExistError = 703
159162

160163

161164
class IndyError(Exception):

0 commit comments

Comments
 (0)