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

error report contain message

parent 10b7aace
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"
...@@ -6,6 +6,7 @@ export type ErrorData = { ...@@ -6,6 +6,7 @@ export type ErrorData = {
timestamp: number | null; timestamp: number | null;
version: string | null; version: string | null;
comment: string | null; comment: string | null;
message: string;
stacktrace: string; stacktrace: string;
javaStacktrace: string | null; javaStacktrace: string | null;
}; };
...@@ -16,8 +16,10 @@ export const createErrorData = async ( ...@@ -16,8 +16,10 @@ export const createErrorData = async (
state: RootState, state: RootState,
): Promise<ErrorData> => { ): Promise<ErrorData> => {
let stacktrace = ''; let stacktrace = '';
let message = '';
if (error !== undefined) { if (error !== undefined) {
stacktrace = error.stack !== undefined ? error.stack : ''; stacktrace = error.stack !== undefined ? error.stack : '';
message = error.message !== undefined ? error.message : '';
} }
let login = null; let login = null;
...@@ -68,5 +70,6 @@ export const createErrorData = async ( ...@@ -68,5 +70,6 @@ export const createErrorData = async (
stacktrace, stacktrace,
timestamp: Math.floor(+new Date() / ONE_THOUSAND), timestamp: Math.floor(+new Date() / ONE_THOUSAND),
version, version,
message,
}; };
}; };
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