Skip to content

Commit 6889db5

Browse files
committed
fix(extensibility): use ConsumptionLevel for UMS destination lookup
The UMS transport passed Level.SUB_ACCOUNT to get_destination(), which appends '@SUB_ACCOUNT' to the URL path. The Destination Service V2 API rejects this with HTTP 400 because it expects lowercase level hints. Use ConsumptionLevel.PROVIDER_SUBACCOUNT instead, which resolves to '@provider_subaccount' — the correct value for provider-scoped destinations like the UMS mTLS destination.
1 parent eb61137 commit 6889db5

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "sap-cloud-sdk"
3-
version = "0.19.1"
3+
version = "0.19.2"
44
description = "SAP Cloud SDK for Python"
55
readme = "README.md"
66
license = "Apache-2.0"

src/sap_cloud_sdk/extensibility/_ums_transport.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import httpx
2525

26-
from sap_cloud_sdk.destination import Level
26+
from sap_cloud_sdk.destination import ConsumptionLevel
2727
from sap_cloud_sdk.destination import create_client as create_destination_client
2828
from sap_cloud_sdk.extensibility._models import (
2929
DEFAULT_EXTENSION_CAPABILITY_ID,
@@ -540,7 +540,8 @@ def get_extension_capability_implementation(
540540
# 1. Resolve destination -----------------------------------------
541541
try:
542542
dest = self._dest_client.get_destination(
543-
self._destination_name, level=Level.SUB_ACCOUNT
543+
self._destination_name,
544+
level=ConsumptionLevel.PROVIDER_SUBACCOUNT,
544545
)
545546
except Exception as exc:
546547
raise TransportError(

0 commit comments

Comments
 (0)