Skip to content
This repository was archived by the owner on Mar 27, 2020. It is now read-only.

CloudFlareException is not catching exceptions after all attempts. #35

Open
paulaolileal opened this issue Jul 18, 2018 · 0 comments
Open

Comments

@paulaolileal
Copy link

...
} catch (AggregateException ex) when (ex.InnerException is CloudFlareClearanceException) {
                // After all retries, clearance still failed.
                Console.WriteLine( ex.Message );
            } catch (AggregateException ex) when (ex.InnerException is TaskCanceledException) {
                // Looks like we ran into a timeout. Too many clearance attempts?
                Console.WriteLine( ex.Message );
                // Maybe you should increase client.Timeout as each attempt will take about five seconds.
            } catch (Exception ex) {
                Console.WriteLine( ex.Message );
            }
...

The code of the example was used, and it continues giving error and was necessary to add a generic exception to capture the same.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant