{"record":{"id":"7493c54911305b68","repo":"Foundry376/Mailspring","slug":"sorry-we-were-unable-to-complete-the-translation","errorCode":null,"errorMessage":"Sorry, we were unable to complete the translation request.","messagePattern":"Sorry, we were unable to complete the translation request\\.","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/internal_packages/github-contact-card/lib/github-user-store.ts","lineNumber":107,"sourceCode":"      }\n\n      this._loading = false;\n      this._profile = this._cache[email] = profile;\n      this.trigger(this);\n    } catch (err) {\n      // fail silently\n    }\n  }\n\n  // Wrap the Node `request` library and pass the User-Agent header, which is required\n  // by Github's API. Also pass `json:true`, which causes responses to be automatically\n  // parsed.\n  async _githubRequest(url: string) {\n    const headers = new Headers();\n    headers.append('User-Agent', 'fetch-request');\n    const resp = await fetch(url, { headers });\n    if (!resp.ok) {\n      throw new Error('Sorry, we were unable to complete the translation request.');\n    }\n    return resp.json();\n  }\n}\n\nexport default new GithubUserStore();\n","sourceCodeStart":89,"sourceCodeEnd":114,"githubUrl":"https://github.com/Foundry376/Mailspring/blob/648c685d602ece6bb00c22534b8734de6ac644b3/app/internal_packages/github-contact-card/lib/github-user-store.ts#L89-L114","documentation":"Generic guard inside GithubUserStore._githubRequest: thrown whenever the GitHub API fetch for a user profile or repo list returns a non-ok response (rate limits, 404 for nonexistent users, auth failures). The message is user-facing but the underlying cause is lost because the status/body are not captured.","triggerScenarios":"Thrown at app/internal_packages/github-contact-card/lib/github-user-store.ts:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include resp.status and a truncated body in the error to distinguish rate limiting (403/429) from a missing user (404)","Respect GitHub's X-RateLimit-Reset header and back off before retrying","Since the caller catches and fails silently, log the failure so debugging is possible"],"exampleFix":null,"handlingStrategy":"try-catch","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"}