microsoft / ApplicationInsights-JS

Microsoft Application Insights SDK for JavaScript
MIT License
652 stars 242 forks source link

Add status code information in case of network errors #338

Open regexrowboat opened 8 years ago

regexrowboat commented 8 years ago

Currently, JavaScript SDK logs status code 0 when the connection between the client and server cannot be resolved. This makes diagnosing network errors very difficult, as there are many different problems that can cause 0 status code in failing dependency calls.

The proposal is to log status code information that indicates whether a network error occurred and what type.

MSNev commented 1 year ago

The actual status code is (or should) already be logged, I'm not sure about the status text.

Generally, though the status code of "zero" means that this is the value returned to JavaScript in these scenario's, I've linked this with a new request about tracking whether the client code explicitly cancelled (called abort() on the XHR for example) to help provide additional information when available. When that item gets worked on this request will be reviewed as well.

github-actions[bot] commented 3 weeks ago

This Issue will be closed in 30 days. Please remove the "Stale" label or comment to avoid closure with no action.