Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion generators/java-v2/sdk/src/SdkGeneratorContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ export class SdkGeneratorContext extends AbstractJavaGeneratorContext<SdkCustomC
}

public getApiExceptionClassName(): string {
return this.customConfig?.["base-api-exception-class-name"] ?? `${this.getBaseNamePrefix()}ApiException`;
return (
this.customConfig?.["base-api-exception-class-name"] ??
`${this.customConfig?.["client-class-name"] ?? this.getBaseNamePrefix()}ApiException`
);
}

public getHttpResponseClassName(): string {
Expand Down
11 changes: 11 additions & 0 deletions generators/java/sdk/versions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# yaml-language-server: $schema=../../../fern-versions-yml.schema.json
- version: 4.0.5
changelogEntry:
- summary: |
Fix generated README exception handling snippet using `{org}ApiException`
instead of `{clientClassName}ApiException` when `client-class-name` is
specified in the Java custom config. The README now uses the same exception
type name that is actually generated in the SDK.
type: fix
createdAt: "2026-03-25"
irVersion: 65

- version: 4.0.4
changelogEntry:
- summary: |
Expand Down
4 changes: 2 additions & 2 deletions seed/java-sdk/exhaustive/custom-client-class-name/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading