kontent-ai / delivery-sdk-net

Kontent.ai Delivery .NET SDK
https://www.nuget.org/packages/Kontent.Ai.Delivery
MIT License
32 stars 41 forks source link

Handle socket exceptions within RetryPolicy #355

Closed erikakus closed 1 year ago

erikakus commented 1 year ago

Motivation

The current solution provides a retry policy only for cases when WebException happens. However, connectivity issues might also occur on the local infrastructure, for which SocketException is thrown.

Proposed solution

Would be awesome to have an extension possibility for handled exception types and response statuses OR just include SocketException handling into DefaultRetryPolicy along with WebExceptions

Additional context

https://learn.microsoft.com/en-us/dotnet/api/system.net.sockets.socketexception?view=net-7.0

dzmitryk-kontent-ai commented 1 year ago

Hi @erikakus. Thank you for the feedback and proposal. We will discuss it and let you know what we can do

dzmitryk-kontent-ai commented 1 year ago

Hi @erikakus. Could you please describe your use-case? Just to let us correctly understand the problem which SocketException should solve and to provide a proper solution for you. And if you want to help us even better, you can include the PR as well 🙂 We welcome the contributions and contributors as well! Thank you.

Simply007 commented 1 year ago

Hi!

This issue has gone quiet. 👻 It’s been a while since the last update here.

If we missed anything on this issue or if you want to keep it open, please reply here.

Thanks for being a part of the Kontent.ai community!