{"record":{"id":"92cdcb7561be72e9","repo":"RocketChat/Rocket.Chat","slug":"failed-to-build-app-request-external-url","errorCode":null,"errorMessage":"Failed to build App Request external url","messagePattern":"Failed to build App Request external url","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/client/apps/orchestrator.ts","lineNumber":155,"sourceCode":"\t\t\tdetails: `${details}`,\n\t\t});\n\n\t\tif ('url' in result) {\n\t\t\treturn result;\n\t\t}\n\n\t\tthrow new Error('Failed to build external url');\n\t}\n\n\tpublic async buildExternalAppRequest(appId: string) {\n\t\tconst result = await sdk.rest.get('/apps/buildExternalAppRequest', {\n\t\t\tappId,\n\t\t});\n\n\t\tif ('url' in result) {\n\t\t\treturn result;\n\t\t}\n\t\tthrow new Error('Failed to build App Request external url');\n\t}\n\n\tpublic async buildIncompatibleExternalUrl(appId: string, appVersion: string, action: string): Promise<IAppExternalURL> {\n\t\tconst result = await sdk.rest.get('/apps/incompatibleModal', {\n\t\t\tappId,\n\t\t\tappVersion,\n\t\t\taction,\n\t\t});\n\n\t\tif ('url' in result) {\n\t\t\treturn result;\n\t\t}\n\n\t\tthrow new Error('Failed to build external url');\n\t}\n\n\tpublic async getCategories(): Promise<Serialized<ICategory[]>> {\n\t\tconst result = await sdk.rest.get('/apps/categories');","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/client/apps/orchestrator.ts#L137-L173","documentation":"Thrown by AppClientOrchestrator.buildExternalAppRequest when GET /apps/buildExternalAppRequest returns a body without a `url` key. This endpoint builds a URL for an end-user app request (the 'request app' flow). A missing `url` field means the server could not construct the request URL.","triggerScenarios":"Calling buildExternalAppRequest(appId) when the app-request feature is disabled, the appId is invalid, the marketplace registration is missing, or the server returns a non-url envelope with a 200 status.","commonSituations":"App requests disabled in admin settings; user not permitted to request apps; marketplace not registered; server version without the buildExternalAppRequest route; network layer returning an error JSON body mapped to 200.","solutions":["Inspect the raw /apps/buildExternalAppRequest response in DevTools.","Confirm the 'App requests' / marketplace feature is enabled in Administration.","Verify the appId is a valid marketplace app.","Ensure the server version supports this route; upgrade if missing."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function hasUrlKey(r: unknown): r is { url: string } {\n  return typeof r === 'object' && r !== null && 'url' in r;\n}","tryCatchPattern":"try {\n  const { url } = await orchestrator.buildExternalAppRequest(appId);\n} catch (e) {\n  if ((e as Error).message === 'Failed to build App Request external url') {\n    showAppRequestDisabledNotice();\n  }\n}","preventionTips":["Confirm app-request feature is enabled in administration.","Verify the appId is a valid marketplace app.","Ensure the route exists in the deployed server version."],"tags":["apps-engine","marketplace","rest","response-shape","app-request"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}