Skip to content

Commit f8eb8f3

Browse files
Added error codes for funding sources errors
1 parent 40bd59d commit f8eb8f3

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ public enum ErrorCode {
8181
UNSPECIFIED,
8282
VERIFICATION_CONFLICT,
8383
WAREHOUSE_CONFLICT,
84-
WEBHOOK_EVENT_TYPE_CONFLICT
84+
WEBHOOK_EVENT_TYPE_CONFLICT,
85+
FUNDING_SOURCE_MISSING_CONFIGURATION,
86+
FUNDING_SOURCE_ERROR
8587
}
8688

8789
/**
@@ -96,23 +98,26 @@ public enum ErrorCode {
9698
* contact ShipEngine for support or if you should contact the carrier or
9799
* marketplace instead.
98100
*
99-
* @see <a href="https://www.shipengine.com/docs/errors/codes/#error-source">...</a>
101+
* @see <a href=
102+
* "https://www.shipengine.com/docs/errors/codes/#error-source">...</a>
100103
*/
101104
private ErrorSource source;
102105

103106
/**
104107
* Indicates the type of error that occurred, such as a validation error, a
105108
* security error, etc.
106109
*
107-
* @see <a href="https://www.shipengine.com/docs/errors/codes/#error-type">...</a>
110+
* @see <a href=
111+
* "https://www.shipengine.com/docs/errors/codes/#error-type">...</a>
108112
*/
109113
private ErrorType type;
110114

111115
/**
112116
* A code that indicates the specific error that occurred, such as missing a
113117
* required field, an invalid address, a timeout, etc.
114118
*
115-
* @see <a href="https://www.shipengine.com/docs/errors/codes/#error-code">...</a>
119+
* @see <a href=
120+
* "https://www.shipengine.com/docs/errors/codes/#error-code">...</a>
116121
*/
117122
private ErrorCode code;
118123

@@ -172,8 +177,7 @@ public ShipEngineException(
172177
ErrorSource source,
173178
ErrorType type,
174179
ErrorCode code,
175-
String url
176-
) {
180+
String url) {
177181
super(message);
178182
setRequestID(requestID);
179183
setSource(source);
@@ -187,8 +191,7 @@ public ShipEngineException(
187191
ErrorSource source,
188192
ErrorType type,
189193
ErrorCode code,
190-
String url
191-
) {
194+
String url) {
192195
super(message);
193196
setSource(source);
194197
setType(type);
@@ -201,8 +204,7 @@ public ShipEngineException(
201204
String requestID,
202205
String source,
203206
String type,
204-
String code
205-
) {
207+
String code) {
206208
super(message);
207209
setRequestID(requestID);
208210
setSource(ErrorSource.valueOf(source.toUpperCase()));
@@ -214,8 +216,7 @@ public ShipEngineException(
214216
String message,
215217
String source,
216218
String type,
217-
String code
218-
) {
219+
String code) {
219220
super(message);
220221
setSource(ErrorSource.valueOf(source.toUpperCase()));
221222
setType(ErrorType.valueOf(type.toUpperCase()));

0 commit comments

Comments
 (0)