June 26, 2024

1.0.1

(break): The Java SDK is now on major version 1. To take this upgrade without any breaks, please add the below configuration to your generators.yml file:

1generators:
2 - name: fernapi/fern-java-sdk
3 config:
4 base-api-exception-class-name: ApiError
5 base-exception-class-name: CompanyException # Optional: This should only be set if default naming is undesirable

(feat): We now generate Exception types for all errors that are defined in the IR. Generated clients with an error discrimination strategy of “status code” will throw one of these typed Exceptions based on the status code of error responses. Example error type:

1public final class BadRequest extends MyCompanyApiError {
2 public BadRequest(Object body) {
3 super("BadRequest", 400, body);
4 }
5}