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

error report does not have a message

parent cfd1ba14
No related branches found
No related tags found
3 merge requests!264Resolve "add support for matomo",!236Main,!233Resolve "problem with reporting error from frontend"
Pipeline #94708 passed
......@@ -28,7 +28,6 @@ export const ErrorReportModal: React.FC = () => {
const javaStacktrace = getValue(errorData?.javaStacktrace);
const stacktrace = getValue(errorData?.stacktrace);
const version = getValue(errorData?.version);
const message = getValue(errorData?.message);
const timestamp = errorData ? errorData.timestamp : Math.floor(+new Date() / ONE_THOUSAND);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
......@@ -42,7 +41,6 @@ export const ErrorReportModal: React.FC = () => {
stacktrace,
version,
timestamp,
message,
});
const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {
......@@ -77,7 +75,6 @@ export const ErrorReportModal: React.FC = () => {
return (
<div className="w-[800px] border border-t-[#E1E0E6] bg-white">
<form onSubmit={handleSubmit} className="p-4">
<p className="my-4 font-bold"> {errorDataToSend.message}</p>
<p className="my-4">
If you agree to submit the following information to the minerva maintainers please uncheck
all boxes that might contain sensitive data.
......
......@@ -6,7 +6,6 @@ export type ErrorData = {
timestamp: number | null;
version: string | null;
comment: string | null;
message: string;
stacktrace: string;
javaStacktrace: string | null;
};
......@@ -16,11 +16,9 @@ export const createErrorData = async (
error: Error | SerializedError | undefined,
state: RootState,
): Promise<ErrorData> => {
let stacktrace = '';
let message = '';
let stacktrace = 'N/A';
if (error !== undefined) {
stacktrace = error.stack !== undefined ? error.stack : '';
message = error.message !== undefined ? error.message : '';
stacktrace = error.stack !== undefined ? error.stack : 'N/A';
}
let login = null;
......@@ -72,6 +70,5 @@ export const createErrorData = async (
stacktrace,
timestamp: Math.floor(+new Date() / ONE_THOUSAND),
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