Skip to content

chore(client)!: refactor exception structure and methods #336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

stainless-app[bot]
Copy link
Contributor

@stainless-app stainless-app bot commented Mar 19, 2025

Migration

Previously you would access error JSON on an exception via exception.error()._additionalProperties(), which would return Map<String, JsonValue>. Now you would access this via exception.body(), which returns JsonValue. You should no longer assume that the returned error JSON is an object. You can check via exception.body().asObject().

# Migration

Previously you would access error JSON on an exception via `exception.error()._additionalProperties()`, which would return `Map<String, JsonValue>`. Now you would access this via `exception.body()`, which returns `JsonValue`. You should no longer assume that the returned error JSON is an object. You can check via `exception.body().asObject()`.
@stainless-app stainless-app bot requested a review from a team as a code owner March 19, 2025 18:58
@stainless-app stainless-app bot merged commit 5f1df47 into generated Mar 19, 2025
@stainless-app stainless-app bot deleted the chore-client-refactor-exception- branch March 19, 2025 18:59
stainless-app bot added a commit that referenced this pull request Mar 19, 2025
# Migration
Previously you would access error JSON on an exception via `exception.error()._additionalProperties()`, which would return `Map<String, JsonValue>`. Now you would access this via `exception.body()`, which returns `JsonValue`. You should no longer assume that the returned error JSON is an object. You can check via `exception.body().asObject()`.
@stainless-app stainless-app bot mentioned this pull request Mar 19, 2025
stainless-app bot added a commit that referenced this pull request Mar 19, 2025
# Migration
Previously you would access error JSON on an exception via `exception.error()._additionalProperties()`, which would return `Map<String, JsonValue>`. Now you would access this via `exception.body()`, which returns `JsonValue`. You should no longer assume that the returned error JSON is an object. You can check via `exception.body().asObject()`.
stainless-app bot added a commit that referenced this pull request Mar 21, 2025
# Migration
Previously you would access error JSON on an exception via `exception.error()._additionalProperties()`, which would return `Map<String, JsonValue>`. Now you would access this via `exception.body()`, which returns `JsonValue`. You should no longer assume that the returned error JSON is an object. You can check via `exception.body().asObject()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants