diff --git a/apps/passport-client/src/validateState.ts b/apps/passport-client/src/validateState.ts index 45a66bbd63..238c1c3628 100644 --- a/apps/passport-client/src/validateState.ts +++ b/apps/passport-client/src/validateState.ts @@ -205,13 +205,19 @@ export function getRunningAppStateValidationErrors( * we have records and are able to identify common types of errors. Does not leak * sensitive information, such as decrypted versions of e2ee storage. */ -export async function logValidationErrors(errors: ErrorReport): Promise { +export async function logValidationErrors( + errorReport: ErrorReport +): Promise { + if (errorReport?.errors?.length === 0) { + console.log(`not logging empty error report`); + } + try { const user = loadSelf(); - errors.userUUID = errors.userUUID ?? user?.uuid; - console.log(`encountered state validation errors: `, errors); + errorReport.userUUID = errorReport.userUUID ?? user?.uuid; + console.log(`encountered state validation errors: `, errorReport); await requestLogToServer(appConfig.zupassServer, "state-validation-error", { - ...errors + ...errorReport }); } catch (e) { console.log("error reporting errors", e);