We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a507b78 commit ba5fefeCopy full SHA for ba5fefe
src/PowerPlatform/Dataverse/data/_odata.py
@@ -156,7 +156,14 @@ def __init__(
156
def _call_scope(self, correlation_id: Optional[str] = None):
157
"""Context manager to share a correlation id across nested SDK calls."""
158
existing = _CALL_SCOPE_CORRELATION_ID.get()
159
- shared_id = correlation_id or existing or str(uuid.uuid4())
+ if correlation_id is not None:
160
+ if not (_GUID_RE.fullmatch(correlation_id)):
161
+ raise ValueError("correlation_id provided must be a GUID string")
162
+ shared_id = correlation_id
163
+ elif existing is not None:
164
+ shared_id = existing
165
+ else:
166
+ shared_id = str(uuid.uuid4())
167
token = _CALL_SCOPE_CORRELATION_ID.set(shared_id)
168
try:
169
yield shared_id
0 commit comments