Skip to content

Commit 8b1dd3e

Browse files
committed
add raises/warning section to setter docs
1 parent a905e76 commit 8b1dd3e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

temporalio/client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ def rpc_metadata(self, value: Mapping[str, Union[str, bytes]]) -> None:
310310
311311
Do not mutate this mapping after set. Rather, set an entirely new
312312
mapping if changes are needed.
313+
314+
Raises:
315+
TypeError: the key/value pair is not a valid gRPC ASCII or binary metadata.
316+
All binary metadata must be supplied as bytes, and the key must end in '-bin'.
317+
318+
.. warning::
319+
Attempting to set an invalid binary RPC metadata value may leave the client
320+
in an inconsistent state (as well as raise a :py:class:`TypeError`).
313321
"""
314322
# Update config and perform update
315323
# This may raise if the metadata is invalid:

0 commit comments

Comments
 (0)