throw ex; resets Exception.StackTrace to the current frame. CA2200 flags this. Consumers see ingest failures as originating in the ingestor, masking the real fault site (serialiser, transport, deserialiser).
Proposal:
catch (Exception ex) { throw; }
Audit the entire file (and ideally the whole repo) for the same anti-pattern with a quick grep: \bthrow\s+\w+\s*; excluding throw new. Apply the same fix to any siblings.
throw ex; resets Exception.StackTrace to the current frame. CA2200 flags this. Consumers see ingest failures as originating in the ingestor, masking the real fault site (serialiser, transport, deserialiser).
Proposal:
catch (Exception ex) { throw; }Audit the entire file (and ideally the whole repo) for the same anti-pattern with a quick grep: \bthrow\s+\w+\s*; excluding throw new. Apply the same fix to any siblings.