Skip to content

Conversation

@mridang
Copy link
Collaborator

@mridang mridang commented Sep 16, 2025

Description

This pull request contains the automatically generated SDK for OpenAPI specification version v4.2.0. The code has been updated to reflect the latest API changes.

Related Issue

N/A - This is a routine, automated SDK generation.

Motivation and Context

This change is required to ensure our SDK remains in sync with the latest version of Zitadel

How Has This Been Tested?

The SDK generation is an automated process.

Documentation

No new documentation page is required.

@mridang mridang self-assigned this Sep 16, 2025
@mridang mridang added the enhancement New feature or request label Sep 16, 2025
The ApiClient failed to handle the body of non-2xx (error) API responses. The code generator did not create the necessary logic to deserialize the default error type defined in the OpenAPI specification. This caused the `response_body` in a caught `ApiError` to always be `None`, making it impossible to debug API failures through the SDK.

This patch modifies the `response_deserialize` method to intelligently process error bodies. It now checks the `Content-Type` header of the response. If the content is JSON, it is decoded into a dictionary. If the content is not JSON or if parsing fails, it gracefully falls back to using the raw text of the body.

This ensures that the `ApiError` exception always contains a useful payload (either a structured dictionary or raw text), significantly improving the debugging experience by making API errors transparent.
@mridang mridang merged commit eab286e into beta Sep 16, 2025
15 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 16, 2025
# [4.1.0-beta.6](v4.1.0-beta.5...v4.1.0-beta.6) (2025-09-16)

### Features

* **sdk:** generate SDK for version v4.2.0 ([#69](#69)) ([eab286e](eab286e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants