ap-client 0.7.1.dev6__tar.gz → 0.7.1.dev7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/PKG-INFO +1 -1
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/canonical_put.py +8 -1
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/pyproject.toml +1 -1
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/__init__.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/akpool_commands.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/api.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/canonical_get.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/cli.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/cluster_layout_fetcher.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/cluster_region_resolver.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/config.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/dataset_commands.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/dataset_name.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/dataset_register.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/dfs_commands.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/exporter.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/fs_commands.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/fs_storage.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/fs_transfer.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/instance_commands.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/instance_options.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/irepo_sdk.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/managed_ak.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/manifest_view.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/ossutil_hash.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/ossutil_io.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/profile_cascade_all.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/profile_cascade_cli.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/profile_cascade_display.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/profile_cascade_state.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/profile_commands.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/profile_diagnostics.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/profile_display.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/profile_references.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/replica_policy.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/repo_read_guard.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/share_api.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/shared_adapter.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/shared_commands.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/split_publish.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/submission_metadata.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/tbb.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/tool_manifest.py +0 -0
- {ap_client-0.7.1.dev6 → ap_client-0.7.1.dev7}/ap_client/waiter.py +0 -0
|
@@ -135,8 +135,12 @@ class APIClientTransportAdapter:
|
|
|
135
135
|
status = getattr(exc, "status_code", None)
|
|
136
136
|
detail = getattr(exc, "detail", None)
|
|
137
137
|
biz_code = None
|
|
138
|
+
data = None
|
|
138
139
|
if isinstance(detail, dict):
|
|
139
140
|
biz_code = detail.get("code")
|
|
141
|
+
candidate = detail.get("data")
|
|
142
|
+
if isinstance(candidate, dict):
|
|
143
|
+
data = {key: candidate[key] for key in ("reason", "apply_url") if key in candidate}
|
|
140
144
|
elif isinstance(detail, str) and detail.strip():
|
|
141
145
|
import json
|
|
142
146
|
|
|
@@ -144,13 +148,16 @@ class APIClientTransportAdapter:
|
|
|
144
148
|
parsed = json.loads(detail)
|
|
145
149
|
if isinstance(parsed, dict):
|
|
146
150
|
biz_code = parsed.get("code")
|
|
151
|
+
candidate = parsed.get("data")
|
|
152
|
+
if isinstance(candidate, dict):
|
|
153
|
+
data = {key: candidate[key] for key in ("reason", "apply_url") if key in candidate}
|
|
147
154
|
except (TypeError, ValueError):
|
|
148
155
|
biz_code = None
|
|
149
156
|
if isinstance(biz_code, bool) or not isinstance(biz_code, int):
|
|
150
157
|
biz_code = None
|
|
151
158
|
# Message is a fixed short label — raw API text is never forwarded.
|
|
152
159
|
label = "apiserver rejected the request"
|
|
153
|
-
return TransportError(label, status=status, biz_code=biz_code)
|
|
160
|
+
return TransportError(label, status=status, biz_code=biz_code, data=data)
|
|
154
161
|
|
|
155
162
|
def _call(self, method: str, path: str, *, json_body=None,
|
|
156
163
|
timeout: float | None = None, params=None):
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ap-client"
|
|
7
|
-
version = "0.7.1.
|
|
7
|
+
version = "0.7.1.dev7"
|
|
8
8
|
description = "Agent Platform API Client & CLI"
|
|
9
9
|
readme = { text = "A lightweight Python SDK and command line interface for Agent Platform. It provides helpers for configuring API access and managing templates, datasets, jobs, and groups.", content-type = "text/markdown" }
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|