Skip to content

Commit 724c1ae

Browse files
Merge pull request #30 from ShipEngine/ENGINE-7190-funding-sources-wallet-errors
Added error codes for funding sources errors
2 parents 40bd59d + c41ac9d commit 724c1ae

File tree

3 files changed

+30
-22
lines changed

3 files changed

+30
-22
lines changed

CHANGELOG.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,28 @@
22

33
## [1.0.3](https://github.com/ShipEngine/shipengine-java/compare/v1.0.2...v1.0.3) (2024-01-17)
44

5-
65
### Bug Fixes
76

8-
* update timeout to 60s ([f8bca01](https://github.com/ShipEngine/shipengine-java/commit/f8bca01e115aba99343f64de30282c25c13ea045))
7+
- update timeout to 60s ([f8bca01](https://github.com/ShipEngine/shipengine-java/commit/f8bca01e115aba99343f64de30282c25c13ea045))
98

109
## 1.0.2 (2022-10-21)
1110

12-
1311
### Bug Fixes
1412

15-
* Fixed exception handling
16-
* Fixed bug in deriveUserAgent method in the InternalClient now reads sdk version from resources/project.properties instead of version.txt. ([2aa3d13](https://github.com/ShipEngine/shipengine-java/commit/2aa3d133756cfb311beb10bec3474dfad91bffef))
17-
* Testing and linting working CI ([748d2ce](https://github.com/ShipEngine/shipengine-java/commit/748d2ceced376e0d66f895f5251ba166e70d9c5f))
18-
* Updated pom.xml settings to fix JaCoCo coverage reporting bug. ([a91ef99](https://github.com/ShipEngine/shipengine-java/commit/a91ef99f29adf74e99478cc248291731be38ddff))
13+
- Fixed exception handling
14+
- Fixed bug in deriveUserAgent method in the InternalClient now reads sdk version from resources/project.properties instead of version.txt. ([2aa3d13](https://github.com/ShipEngine/shipengine-java/commit/2aa3d133756cfb311beb10bec3474dfad91bffef))
15+
- Testing and linting working CI ([748d2ce](https://github.com/ShipEngine/shipengine-java/commit/748d2ceced376e0d66f895f5251ba166e70d9c5f))
16+
- Updated pom.xml settings to fix JaCoCo coverage reporting bug. ([a91ef99](https://github.com/ShipEngine/shipengine-java/commit/a91ef99f29adf74e99478cc248291731be38ddff))
1917

2018
## 1.0.3
2119

2220
### Changes
2321

24-
* increase default timeout to 60s
22+
- increase default timeout to 60s
23+
24+
## 1.0.4
25+
26+
### Changes
27+
28+
- Added error code FundingSourceMissingConfiguration
29+
- Added error code FundingSourceError

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.shipengine</groupId>
88
<artifactId>shipengine</artifactId>
9-
<version>1.0.3</version>
9+
<version>1.0.4</version>
1010

1111
<name>ShipEngine SDK</name>
1212
<description>The official Java SDK for ShipEngine API.</description>

src/main/java/com/shipengine/exception/ShipEngineException.java

+16-13
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public enum ErrorType {
4040
ERROR,
4141
SECURITY,
4242
SYSTEM,
43-
VALIDATION
43+
VALIDATION,
44+
WALLET,
45+
FUNDING_SOURCES
4446
}
4547

4648
public enum ErrorCode {
@@ -81,7 +83,9 @@ public enum ErrorCode {
8183
UNSPECIFIED,
8284
VERIFICATION_CONFLICT,
8385
WAREHOUSE_CONFLICT,
84-
WEBHOOK_EVENT_TYPE_CONFLICT
86+
WEBHOOK_EVENT_TYPE_CONFLICT,
87+
FUNDING_SOURCE_MISSING_CONFIGURATION,
88+
FUNDING_SOURCE_ERROR
8589
}
8690

8791
/**
@@ -96,23 +100,26 @@ public enum ErrorCode {
96100
* contact ShipEngine for support or if you should contact the carrier or
97101
* marketplace instead.
98102
*
99-
* @see <a href="https://www.shipengine.com/docs/errors/codes/#error-source">...</a>
103+
* @see <a href=
104+
* "https://www.shipengine.com/docs/errors/codes/#error-source">...</a>
100105
*/
101106
private ErrorSource source;
102107

103108
/**
104109
* Indicates the type of error that occurred, such as a validation error, a
105110
* security error, etc.
106111
*
107-
* @see <a href="https://www.shipengine.com/docs/errors/codes/#error-type">...</a>
112+
* @see <a href=
113+
* "https://www.shipengine.com/docs/errors/codes/#error-type">...</a>
108114
*/
109115
private ErrorType type;
110116

111117
/**
112118
* A code that indicates the specific error that occurred, such as missing a
113119
* required field, an invalid address, a timeout, etc.
114120
*
115-
* @see <a href="https://www.shipengine.com/docs/errors/codes/#error-code">...</a>
121+
* @see <a href=
122+
* "https://www.shipengine.com/docs/errors/codes/#error-code">...</a>
116123
*/
117124
private ErrorCode code;
118125

@@ -172,8 +179,7 @@ public ShipEngineException(
172179
ErrorSource source,
173180
ErrorType type,
174181
ErrorCode code,
175-
String url
176-
) {
182+
String url) {
177183
super(message);
178184
setRequestID(requestID);
179185
setSource(source);
@@ -187,8 +193,7 @@ public ShipEngineException(
187193
ErrorSource source,
188194
ErrorType type,
189195
ErrorCode code,
190-
String url
191-
) {
196+
String url) {
192197
super(message);
193198
setSource(source);
194199
setType(type);
@@ -201,8 +206,7 @@ public ShipEngineException(
201206
String requestID,
202207
String source,
203208
String type,
204-
String code
205-
) {
209+
String code) {
206210
super(message);
207211
setRequestID(requestID);
208212
setSource(ErrorSource.valueOf(source.toUpperCase()));
@@ -214,8 +218,7 @@ public ShipEngineException(
214218
String message,
215219
String source,
216220
String type,
217-
String code
218-
) {
221+
String code) {
219222
super(message);
220223
setSource(ErrorSource.valueOf(source.toUpperCase()));
221224
setType(ErrorType.valueOf(type.toUpperCase()));

0 commit comments

Comments
 (0)