{"record":{"id":"0d8b44dd1ddc0d6f","repo":"langgenius/dify","slug":"app-unavailable-0d8b44","errorCode":"app_unavailable","errorMessage":"App unavailable, please check your app configurations.","messagePattern":"App unavailable, please check your app configurations\\.","errorType":"error_code","errorClass":"AppUnavailableError","httpStatus":400,"severity":"error","filePath":"api/controllers/console/explore/audio.py","lineNumber":56,"sourceCode":"\nfrom .. import console_ns\n\nlogger = logging.getLogger(__name__)\n\nregister_schema_model(console_ns, TextToAudioPayload)\nregister_response_schema_models(console_ns, AudioBinaryResponse, AudioTranscriptResponse)\n\n\n@console_ns.route(\n    \"/installed-apps/<uuid:installed_app_id>/audio-to-text\",\n    endpoint=\"installed_app_audio\",\n)\nclass ChatAudioApi(InstalledAppResource):\n    @console_ns.response(200, \"Success\", console_ns.models[AudioTranscriptResponse.__name__])\n    def post(self, installed_app: InstalledApp):\n        app_model = installed_app.app_with_session(session=db.session())\n        if app_model is None:\n            raise AppUnavailableError()\n\n        file = request.files[\"file\"]\n\n        try:\n            response = AudioService.transcript_asr(\n                app_model=app_model,\n                file=file,\n                session=db.session(),\n                end_user=None,\n            )\n\n            return response\n        except services.errors.app_model_config.AppModelConfigBrokenError:\n            logger.exception(\"App model config broken.\")\n            raise AppUnavailableError()\n        except NoAudioUploadedServiceError:\n            raise NoAudioUploadedError()\n        except AudioTooLargeServiceError as e:","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/explore/audio.py#L38-L74","documentation":"Raised as AppUnavailableError (error_code app_unavailable, HTTP 400) at the top of ChatAudioApi.post in explore/audio.py (POST /installed-apps/<installed_app_id>/audio-to-text). When installed_app.app_with_session returns None the underlying App is gone, so there is nothing to run speech-to-text against. AppUnavailableError's fixed description is 'App unavailable, please check your app configurations.'","triggerScenarios":"Calling the installed-app audio endpoint after the App referenced by the InstalledApp was deleted or could not be loaded. The `if app_model is None` guard fires immediately and raises.","commonSituations":"Installed app whose source app was removed; app soft-deleted but installed-app record remains; tenant/app scope mismatch on the session; exploring a stale installed-app link.","solutions":["Verify the installed_app_id still points to a live App (re-list installed apps).","Reinstall the app from the explore marketplace if the source was removed.","On the client, treat app_unavailable as 'app deleted, refresh'.","Confirm the authenticated account can access the app's tenant."],"exampleFix":"// before\nPOST /installed-apps/<installed-app-id>/audio-to-text   // app deleted -> 400 app_unavailable\n// after\ninstalled = await GET /installed-apps          // pick a live one\nPOST /installed-apps/<installed[0].id>/audio-to-text","handlingStrategy":"validation","validationCode":"async function audioToText(installedAppId) {\n  const installed = await fetch(`/installed-apps`).then(r => r.json());\n  const entry = (installed.items ?? []).find(i => i.id === installedAppId && i.app);\n  if (!entry) throw new Error('app_unavailable');\n  return fetch(`/installed-apps/${installedAppId}/audio-to-text`, { method: 'POST', body: formData });\n}","typeGuard":"function isLiveInstalledApp(entry) { return !!entry && !!entry.app; }","tryCatchPattern":"try { await audioToText(id); } catch (e) { if (e.code === 'app_unavailable') { refreshInstalledApps(); return; } throw e; }","preventionTips":["Re-list installed apps before calling.","Reinstall the app if its source was deleted.","Treat app_unavailable as 'app deleted, refresh'."],"tags":["explore","app","audio","http-400"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}