From 9eb7647ff6186885620e3d030142109163bbcb70 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 15:55:49 +0000 Subject: [PATCH] feat!: remove ErrorResponse type from summary resource MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the ErrorResponse class from the summary types package to simplify error handling patterns and align with standardized error response structures across the SDK. This is a breaking change that affects consumers who were directly importing or referencing the ErrorResponse type from the summary package. Applications should migrate to use the standardized error handling mechanisms provided by the core SDK client. Key changes: - Remove ErrorResponse class from com.phenoml.api.resources.summary.types package - Eliminate custom error response structure with success and error fields - Streamline error handling to use SDK-wide standardized patterns 🌿 Generated with Fern --- build.gradle | 4 +- changelog.md | 3 + .../com/phenoml/api/core/ClientOptions.java | 4 +- .../summary/types/ErrorResponse.java | 123 ------------------ 4 files changed, 7 insertions(+), 127 deletions(-) delete mode 100644 src/main/java/com/phenoml/api/resources/summary/types/ErrorResponse.java diff --git a/build.gradle b/build.gradle index a23fba2..ef9cc15 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ java { group = 'com.phenoml.maven' -version = '9.1.0' +version = '10.0.0' jar { dependsOn(":generatePomFileForMavenPublication") @@ -78,7 +78,7 @@ publishing { maven(MavenPublication) { groupId = 'com.phenoml.maven' artifactId = 'phenoml-java-sdk' - version = '9.1.0' + version = '10.0.0' from components.java pom { name = 'phenoml' diff --git a/changelog.md b/changelog.md index 336f813..d091e94 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +## 10.0.0 - 2026-03-10 +* The `ErrorResponse` class has been removed from `com.phenoml.api.resources.summary.types`. Applications that imported or used this class should migrate to the standardized error handling mechanisms provided by the core SDK client. + ## 9.1.0 - 2026-03-09 * feat: add HTTP 429 and 503 error handling to FHIR client * Enhance the FHIR client with comprehensive error handling for rate limiting (429) and service unavailability (503) scenarios. This improves the SDK's resilience and provides better error feedback to developers. diff --git a/src/main/java/com/phenoml/api/core/ClientOptions.java b/src/main/java/com/phenoml/api/core/ClientOptions.java index b74b9a0..2bb1790 100644 --- a/src/main/java/com/phenoml/api/core/ClientOptions.java +++ b/src/main/java/com/phenoml/api/core/ClientOptions.java @@ -32,10 +32,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/9.1.0"); + put("User-Agent", "com.phenoml.maven:phenoml-java-sdk/10.0.0"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.phenoml.fern:api-sdk"); - put("X-Fern-SDK-Version", "9.1.0"); + put("X-Fern-SDK-Version", "10.0.0"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/phenoml/api/resources/summary/types/ErrorResponse.java b/src/main/java/com/phenoml/api/resources/summary/types/ErrorResponse.java deleted file mode 100644 index 6328adc..0000000 --- a/src/main/java/com/phenoml/api/resources/summary/types/ErrorResponse.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ -package com.phenoml.api.resources.summary.types; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSetter; -import com.fasterxml.jackson.annotation.Nulls; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.phenoml.api.core.ObjectMappers; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -@JsonInclude(JsonInclude.Include.NON_ABSENT) -@JsonDeserialize(builder = ErrorResponse.Builder.class) -public final class ErrorResponse { - private final Optional success; - - private final Optional error; - - private final Map additionalProperties; - - private ErrorResponse(Optional success, Optional error, Map additionalProperties) { - this.success = success; - this.error = error; - this.additionalProperties = additionalProperties; - } - - @JsonProperty("success") - public Optional getSuccess() { - return success; - } - - /** - * @return Error message describing what went wrong - */ - @JsonProperty("error") - public Optional getError() { - return error; - } - - @java.lang.Override - public boolean equals(Object other) { - if (this == other) return true; - return other instanceof ErrorResponse && equalTo((ErrorResponse) other); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - private boolean equalTo(ErrorResponse other) { - return success.equals(other.success) && error.equals(other.error); - } - - @java.lang.Override - public int hashCode() { - return Objects.hash(this.success, this.error); - } - - @java.lang.Override - public String toString() { - return ObjectMappers.stringify(this); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonIgnoreProperties(ignoreUnknown = true) - public static final class Builder { - private Optional success = Optional.empty(); - - private Optional error = Optional.empty(); - - @JsonAnySetter - private Map additionalProperties = new HashMap<>(); - - private Builder() {} - - public Builder from(ErrorResponse other) { - success(other.getSuccess()); - error(other.getError()); - return this; - } - - @JsonSetter(value = "success", nulls = Nulls.SKIP) - public Builder success(Optional success) { - this.success = success; - return this; - } - - public Builder success(Boolean success) { - this.success = Optional.ofNullable(success); - return this; - } - - /** - *

Error message describing what went wrong

- */ - @JsonSetter(value = "error", nulls = Nulls.SKIP) - public Builder error(Optional error) { - this.error = error; - return this; - } - - public Builder error(String error) { - this.error = Optional.ofNullable(error); - return this; - } - - public ErrorResponse build() { - return new ErrorResponse(success, error, additionalProperties); - } - } -}