{"record":{"id":"fbf4fa0cd0bc4d8e","repo":"Foundry376/Mailspring","slug":"thread-not-found","errorCode":null,"errorMessage":"Thread not found","messagePattern":"Thread not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/internal_packages/thread-list/lib/thread-permalink-handler.ts","lineNumber":56,"sourceCode":"        new Matcher.And([\n          Thread.attributes.lastMessageReceivedTimestamp.lessThan(lastDate + dateEpsilon),\n          Thread.attributes.lastMessageReceivedTimestamp.greaterThan(lastDate - dateEpsilon),\n        ]),\n      ]);\n\n  return DatabaseStore.findBy<Thread>(Thread).where([\n    Thread.attributes.subject.equal(subject),\n    dateClause,\n  ]);\n};\n\nconst _onOpenThreadFromWeb = (event: Electron.IpcRendererEvent, mailspringUrl: string) => {\n  const params = _parseOpenThreadUrl(mailspringUrl);\n\n  _findCorrespondingThread(params)\n    .then((thread) => {\n      if (!thread) {\n        throw new Error('Thread not found');\n      }\n      Actions.popoutThread(thread);\n    })\n    .catch((error) => {\n      AppEnv.reportError(error);\n      AppEnv.showErrorDialog(\n        localized(`The thread %@ does not exist in your mailbox!`, params.subject)\n      );\n    });\n};\n\nexport function activate() {\n  ipcRenderer.on('openThreadFromWeb', _onOpenThreadFromWeb);\n}\n","sourceCodeStart":38,"sourceCodeEnd":71,"githubUrl":"https://github.com/Foundry376/Mailspring/blob/648c685d602ece6bb00c22534b8734de6ac644b3/app/internal_packages/thread-list/lib/thread-permalink-handler.ts#L38-L71","documentation":"Guard in the thread-permalink IPC handler: a mailspring://thread permalink opened from the web (subject + timestamp window parsed from the URL) matched no thread in the local database. The thread either belongs to another machine/account or falls outside the lastMessageReceivedTimestamp epsilon window used to match it.","triggerScenarios":"Thrown at app/internal_packages/thread-list/lib/thread-permalink-handler.ts:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Notify the user that the thread isn't available on this device and optionally open a search for the subject","Widen the date epsilon used in _findCorrespondingThread if permails from cross-timezone clients fail to match"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"648c685d602ece6bb00c22534b8734de6ac644b3","analyzedAt":"2026-09-03T02:00:24.311Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}