feat(logs): improve logs by logging errors with causes and metadata (#2703)

* feat(logs): improve logs by logging errors with causes and metadata

* fix: deepsource issue
This commit is contained in:
Meier Lukas
2025-03-26 21:53:51 +01:00
committed by GitHub
parent 3e1c000d51
commit 579dd5763d
10 changed files with 81 additions and 45 deletions

View File

@@ -1,4 +1,3 @@
import { formatError } from "pretty-print-error";
import SuperJSON from "superjson";
import { hashObjectBase64, Stopwatch } from "@homarr/common";
@@ -107,7 +106,9 @@ export const createRequestIntegrationJobHandler = <
);
} catch (error) {
logger.error(
`Failed to run integration job integration=${integrationId} inputHash='${inputHash}' error=${formatError(error)}`,
new Error(`Failed to run integration job integration=${integrationId} inputHash='${inputHash}'`, {
cause: error,
}),
);
}
}