Skip to content
Snippets Groups Projects
Commit 9cb5febe authored by Piotr Gawron's avatar Piotr Gawron
Browse files

add browser to error data

parent f869d05e
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!199Resolve "[MIN-321] form for reporting errors in minerva"
......@@ -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');
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment