Skip to content

Commit bfd43d3

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 bfd43d3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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)