Skip to content

Commit 225df17

Browse files
authored
exception handling, webhook handler (#65)
* exception handling, webhhok handler * lib update * version bumpup
1 parent eb98d02 commit 225df17

1,089 files changed

Lines changed: 104712 additions & 103163 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
jdk: ['8', '11', '17']
12+
jdk: ['11', '17']
1313

1414
steps:
1515
- uses: actions/checkout@v4

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The v4 SDK provides a modern, immutable client with enhanced type safety and imp
4747
#### Gradle (Kotlin DSL)
4848
```kotlin
4949
dependencies {
50-
implementation("com.chargebee:chargebee-java:4.0.0")
50+
implementation("com.chargebee:chargebee-java:4.0.0-beta.3")
5151
}
5252
```
5353

@@ -56,7 +56,7 @@ dependencies {
5656
<dependency>
5757
<groupId>com.chargebee</groupId>
5858
<artifactId>chargebee-java</artifactId>
59-
<version>4.0.0</version>
59+
<version>4.0.0-beta.3</version>
6060
</dependency>
6161
```
6262

@@ -221,23 +221,29 @@ The library provides a comprehensive exception hierarchy with **strongly-typed e
221221

222222
#### Exception Hierarchy
223223

224-
All Chargebee exceptions extend from `TransportException`, which is a checked exception:
224+
All Chargebee exceptions extend from `ChargebeeException`, which is an unchecked exception:
225225

226226
```
227-
TransportException (checked)
228-
└── HttpException (HTTP status code errors: 4xx, 5xx)
229-
├── ClientErrorException (4xx errors)
230-
├── ServerErrorException (5xx errors)
231-
└── APIException (Chargebee API errors)
232-
├── InvalidRequestException (validation errors)
233-
├── PaymentException (payment-related errors)
234-
├── OperationFailedException (business logic errors)
235-
├── BatchAPIException (batch operation errors)
236-
└── UbbBatchIngestionInvalidRequestException (batch ingestion errors)
227+
ChargebeeException (unchecked - extends RuntimeException)
228+
├── ConfigurationException (setup/config errors)
229+
└── TransportException (runtime API errors)
230+
├── NetworkException (DNS failures, connection refused)
231+
├── TimeoutException (connect/read timeouts)
232+
└── HttpException (HTTP status code errors: 4xx, 5xx)
233+
├── ClientErrorException (4xx errors)
234+
├── ServerErrorException (5xx errors)
235+
└── APIException (Chargebee API errors)
236+
├── InvalidRequestException (validation errors)
237+
├── PaymentException (payment-related errors)
238+
├── OperationFailedException (business logic errors)
239+
├── BatchAPIException (batch operation errors)
240+
└── UbbBatchIngestionInvalidRequestException (batch ingestion errors)
237241
```
238242

239243
#### Exception Types
240244

245+
- **`ChargebeeException`**: Base exception for all SDK errors - catch-all for any Chargebee SDK error
246+
- **`ConfigurationException`**: Thrown when SDK configuration is invalid (missing API key, invalid URL, etc.)
241247
- **`TransportException`**: Base exception for all transport-layer failures (network issues, timeouts, etc.)
242248
- **`HttpException`**: Thrown for HTTP error status codes (4xx, 5xx) - contains status code and response
243249
- **`ClientErrorException`**: HTTP 4xx client errors (bad request, unauthorized, not found, etc.)

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group = "com.chargebee"
9-
version = "4.0.0"
9+
version = "4.0.0-beta.3"
1010
description = "Next-gen Java client library for ChargeBee API"
1111

1212
// Project metadata
@@ -30,8 +30,8 @@ extra["projectLicenseUrl"] = projectLicenseUrl
3030
extra["teamMembers"] = teamMembers
3131

3232
java {
33-
sourceCompatibility = JavaVersion.VERSION_1_8
34-
targetCompatibility = JavaVersion.VERSION_1_8
33+
sourceCompatibility = JavaVersion.VERSION_11
34+
targetCompatibility = JavaVersion.VERSION_11
3535
withSourcesJar()
3636
withJavadocJar()
3737
}
23.2 MB
Binary file not shown.
2.14 MB
Binary file not shown.
8.55 MB
Binary file not shown.
-22.9 MB
Binary file not shown.
-2.14 MB
Binary file not shown.

dist/chargebee-java-4.0.0.jar

-9.22 MB
Binary file not shown.

docs/MIGRATION_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The v4 SDK provides a modern, immutable client with enhanced type safety and imp
3434
<dependency>
3535
<groupId>com.chargebee</groupId>
3636
<artifactId>chargebee-java</artifactId>
37-
<version>4.0.0</version>
37+
<version>4.0.0-beta.3</version>
3838
</dependency>
3939
```
4040

0 commit comments

Comments
 (0)