You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve Dataverse error instrumentation for web extension (#1462)
* Improve Dataverse error instrumentation for web extension
Fix empty "{}" error messages in telemetry for Dataverse save and fetch
operations. The Response object from fetch has non-enumerable properties,
causing JSON.stringify(response) to produce "{}".
Changes:
- Add errorHandlerUtil.ts with createHttpResponseError() to properly
extract HTTP status, statusText, and response body from Response objects
- Update remoteSaveProvider.ts, remoteFetchProvider.ts, etagHandlerService.ts,
WebExtensionContext.ts, and graphClientService.ts to use the new utility
- Update catch blocks to use isHttpResponseError() type guard for proper
HTTP error routing to sendAPIFailureTelemetry with status codes
This enables proper diagnosis of the 92% of save errors and 24% of fetch
errors that were previously logged with empty error messages.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix tests for updated HTTP error handling
Update test mocks to include required Response properties (status, url,
clone, text) that createHttpResponseError needs. Also update test
assertions to expect sendAPIFailureTelemetry instead of sendErrorTelemetry
for HTTP errors, matching the new error handling flow.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Amit Joshi <amitjoshi@microsoft.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments