diff --git a/src/utils/error-report/errorReporting.test.ts b/src/utils/error-report/errorReporting.test.ts index 8ffa91e72806e0dfc5a961a726ab0a09649822e2..c90ef65c40f79bc454ce26cf7962f17368383c01 100644 --- a/src/utils/error-report/errorReporting.test.ts +++ b/src/utils/error-report/errorReporting.test.ts @@ -26,6 +26,11 @@ describe('createErrorData', () => { expect(error.url).not.toBeNull(); }); + it('should add browser', () => { + const error = createErrorData(new Error('hello')); + expect(error.browser).not.toBeNull(); + }); + it('should add guest login when not logged', () => { const error = createErrorData(new Error('hello')); expect(error.login).toBe('anonymous'); diff --git a/src/utils/error-report/errorReporting.ts b/src/utils/error-report/errorReporting.ts index 85e5c2f81e36e0c5f47c881f89d90807ce2d08c2..348769f5a86e5da8605caf63e1b76421e5514b90 100644 --- a/src/utils/error-report/errorReporting.ts +++ b/src/utils/error-report/errorReporting.ts @@ -18,7 +18,7 @@ export const createErrorData = (error: Error | SerializedError | undefined): Err const errorData: ErrorData = { url: window.location.href, login, - browser: null, // TODO + browser: navigator.userAgent, comment: null, email: null, // TODO javaStacktrace: null, // TODO