msgraph-sdk-python-core icon indicating copy to clipboard operation
msgraph-sdk-python-core copied to clipboard

retry_on_status_codes works with client.get() but not client.put()?

Open jbt-jaime opened this issue 3 years ago • 1 comments

Hello,

Just want to confirm the reason why apparently the kwarg called retry_on_status_codes works in client.get(), as in the following example, but not with client.put():

https://github.com/microsoftgraph/msgraph-sdk-python-core/blob/0c1fc5eb12e372d1d607a0961b2e1f7b6dba9a2d/samples/retry_handler_samples.py#L49

When I try to add that parameter to client.put() I get the following error:

>       return self.request('PUT', url, data=data, **kwargs)
E       TypeError: request() got an unexpected keyword argument 'retry_on_status_codes'

I'm looking through the requests source and even their Session class and I see everywhere that both get() and put() take whatever request takes:

    :param \*\*kwargs: Optional arguments that ``request`` takes.

So if get() accepts retry_on_status_codes why doesn't put() accept it?

jbt-jaime avatar May 25 '22 10:05 jbt-jaime

??

jbt-jaime avatar Jun 22 '22 08:06 jbt-jaime

thanks for reporting this issue, we have since released a new version of the SDK which this issue doesn't apply to. We encourage you to migrate to the new version and open a new issue if you still need help

baywet avatar Apr 25 '24 15:04 baywet