From f8eb8f3131629d519652ed3ee5290935f893a6fb Mon Sep 17 00:00:00 2001 From: "christian.casado" Date: Wed, 7 Aug 2024 09:30:13 +0200 Subject: [PATCH 1/4] Added error codes for funding sources errors --- .../exception/ShipEngineException.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/shipengine/exception/ShipEngineException.java b/src/main/java/com/shipengine/exception/ShipEngineException.java index 772e7c0..12e25c1 100644 --- a/src/main/java/com/shipengine/exception/ShipEngineException.java +++ b/src/main/java/com/shipengine/exception/ShipEngineException.java @@ -81,7 +81,9 @@ public enum ErrorCode { UNSPECIFIED, VERIFICATION_CONFLICT, WAREHOUSE_CONFLICT, - WEBHOOK_EVENT_TYPE_CONFLICT + WEBHOOK_EVENT_TYPE_CONFLICT, + FUNDING_SOURCE_MISSING_CONFIGURATION, + FUNDING_SOURCE_ERROR } /** @@ -96,7 +98,8 @@ public enum ErrorCode { * contact ShipEngine for support or if you should contact the carrier or * marketplace instead. * - * @see ... + * @see ... */ private ErrorSource source; @@ -104,7 +107,8 @@ public enum ErrorCode { * Indicates the type of error that occurred, such as a validation error, a * security error, etc. * - * @see ... + * @see ... */ private ErrorType type; @@ -112,7 +116,8 @@ public enum ErrorCode { * A code that indicates the specific error that occurred, such as missing a * required field, an invalid address, a timeout, etc. * - * @see ... + * @see ... */ private ErrorCode code; @@ -172,8 +177,7 @@ public ShipEngineException( ErrorSource source, ErrorType type, ErrorCode code, - String url - ) { + String url) { super(message); setRequestID(requestID); setSource(source); @@ -187,8 +191,7 @@ public ShipEngineException( ErrorSource source, ErrorType type, ErrorCode code, - String url - ) { + String url) { super(message); setSource(source); setType(type); @@ -201,8 +204,7 @@ public ShipEngineException( String requestID, String source, String type, - String code - ) { + String code) { super(message); setRequestID(requestID); setSource(ErrorSource.valueOf(source.toUpperCase())); @@ -214,8 +216,7 @@ public ShipEngineException( String message, String source, String type, - String code - ) { + String code) { super(message); setSource(ErrorSource.valueOf(source.toUpperCase())); setType(ErrorType.valueOf(type.toUpperCase())); From fe773ac5b3b9d79b982eadf9b568c01d2f428c6d Mon Sep 17 00:00:00 2001 From: "christian.casado" Date: Wed, 7 Aug 2024 10:07:51 +0200 Subject: [PATCH 2/4] Added error codes for funding sources errors --- .../java/com/shipengine/exception/ShipEngineException.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/shipengine/exception/ShipEngineException.java b/src/main/java/com/shipengine/exception/ShipEngineException.java index 12e25c1..4e842ec 100644 --- a/src/main/java/com/shipengine/exception/ShipEngineException.java +++ b/src/main/java/com/shipengine/exception/ShipEngineException.java @@ -40,7 +40,9 @@ public enum ErrorType { ERROR, SECURITY, SYSTEM, - VALIDATION + VALIDATION, + WALLET, + FUNDING_SOURCES } public enum ErrorCode { From 4f7959c4ea4db9b18c68f00d26926bf8c22e3926 Mon Sep 17 00:00:00 2001 From: "christian.casado" Date: Wed, 8 Jan 2025 22:37:42 +0100 Subject: [PATCH 3/4] Empty-Commit From c41ac9d6722d4fa6b24b985f6771c3839f6d39fa Mon Sep 17 00:00:00 2001 From: "christian.casado" Date: Wed, 8 Jan 2025 23:08:50 +0100 Subject: [PATCH 4/4] increase of version --- CHANGELOG.md | 21 +++++++++++++-------- pom.xml | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e04b0cd..2857485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,23 +2,28 @@ ## [1.0.3](https://github.com/ShipEngine/shipengine-java/compare/v1.0.2...v1.0.3) (2024-01-17) - ### Bug Fixes -* update timeout to 60s ([f8bca01](https://github.com/ShipEngine/shipengine-java/commit/f8bca01e115aba99343f64de30282c25c13ea045)) +- update timeout to 60s ([f8bca01](https://github.com/ShipEngine/shipengine-java/commit/f8bca01e115aba99343f64de30282c25c13ea045)) ## 1.0.2 (2022-10-21) - ### Bug Fixes -* Fixed exception handling -* 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)) -* Testing and linting working CI ([748d2ce](https://github.com/ShipEngine/shipengine-java/commit/748d2ceced376e0d66f895f5251ba166e70d9c5f)) -* Updated pom.xml settings to fix JaCoCo coverage reporting bug. ([a91ef99](https://github.com/ShipEngine/shipengine-java/commit/a91ef99f29adf74e99478cc248291731be38ddff)) +- Fixed exception handling +- 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)) +- Testing and linting working CI ([748d2ce](https://github.com/ShipEngine/shipengine-java/commit/748d2ceced376e0d66f895f5251ba166e70d9c5f)) +- Updated pom.xml settings to fix JaCoCo coverage reporting bug. ([a91ef99](https://github.com/ShipEngine/shipengine-java/commit/a91ef99f29adf74e99478cc248291731be38ddff)) ## 1.0.3 ### Changes -* increase default timeout to 60s +- increase default timeout to 60s + +## 1.0.4 + +### Changes + +- Added error code FundingSourceMissingConfiguration +- Added error code FundingSourceError diff --git a/pom.xml b/pom.xml index ac5ad49..dd63fa2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.shipengine shipengine - 1.0.3 + 1.0.4 ShipEngine SDK The official Java SDK for ShipEngine API.