Skip to content

Commit 833a354

Browse files
committed
chore: log warning if a key is removed
1 parent 5fdca87 commit 833a354

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ibm_cloud_sdk_core/base_service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,9 @@ def send(self, request: requests.Request, **kwargs) -> DetailedResponse:
280280
# Remove the keys we set manually, don't let the user to overwrite these.
281281
reserved_keys = ['method', 'url', 'headers', 'params', 'cookies']
282282
for key in reserved_keys:
283-
kwargs.pop(key, None)
284-
283+
if key in kwargs:
284+
del kwargs[key]
285+
logging.warning('"%s" has been removed from the request', key)
285286
try:
286287
response = self.http_client.request(**request,
287288
cookies=self.jar,

0 commit comments

Comments
 (0)