Sonar Exceptions - how to avoid this?

Code Smell: Refactor this method to reduce its Cognitive Complexity from 75 to the 15 allowed.

Hi,

Welcome to the community!

What you’re seeing is a Cognitive Complexity issue that indicates you have more control flow in your method than the rule is configured to allow.

I did a webinar a while back on how to refactor for lower Cognitive Complexity. Hopefully it will help. Feel free to come back if you have specific questions about it.

 
Ann