{"record":{"id":"e117282966c99047","repo":"langgenius/dify","slug":"app-unavailable","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/app/audio.py","lineNumber":153,"sourceCode":"        if agent_soul is None:\n            response = AudioService.transcript_asr(\n                app_model=app_model,\n                file=file,\n                session=session,\n                end_user=None,\n            )\n        else:\n            response = AudioService.transcript_agent_asr(\n                app_model=app_model,\n                agent_soul=agent_soul,\n                file=file,\n                session=session,\n                end_user=None,\n            )\n        return dump_response(AudioTranscriptResponse, 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:\n        raise AudioTooLargeError(str(e))\n    except UnsupportedAudioTypeServiceError:\n        raise UnsupportedAudioTypeError()\n    except ProviderNotSupportSpeechToTextServiceError:\n        raise ProviderNotSupportSpeechToTextError()\n    except SpeechToTextDisabledServiceError:\n        raise SpeechToTextDisabledError()\n    except ProviderTokenNotInitError as ex:\n        raise ProviderNotInitializeError(ex.description)\n    except QuotaExceededError:\n        raise ProviderQuotaExceededError()\n    except ModelCurrentlyNotSupportError:\n        raise ProviderModelCurrentlyNotSupportError()\n    except InvokeError as e:\n        raise CompletionRequestError(e.description)","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/app/audio.py#L135-L171","documentation":"Raised by _transcribe_audio_to_text when AudioService raises services.errors.app_model_config.AppModelConfigBrokenError — the app's stored model configuration JSON is malformed or references a non-existent model. The controller logs the exception and translates it to AppUnavailableError (400, error_code 'app_unavailable').","triggerScenarios":"Calling POST /console/apps/{app_id}/audio-to-text (or /agent/{agent_id}/audio-to-text) on an app whose model_config is corrupt: missing fields, invalid JSON, or a model_dict pointing at a deleted provider/model.","commonSituations":"App migrated between Dify versions where the config schema changed and no migration ran; manually edited model config; provider/model referenced in config was removed; legacy app never had its config upgraded.","solutions":["Open the app in the console and re-save the model configuration to regenerate a valid model_config.","Re-select the speech-to-text model in the app settings to refresh model_dict.","If the app is beyond repair, export the DSL, fix the model section, and re-import.","Inspect the app_model_config row in the DB for malformed JSON if you have admin access."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await axios.post(`/apps/${id}/audio-to-text`, form); }\ncatch (e) { if (e.code === 'app_unavailable') { /* prompt user to re-save model config in the app */ } }","preventionTips":["Re-save the app model configuration after upgrades or provider changes.","Re-select the speech-to-text model when swapping providers.","Export/inspect the DSL if the app config becomes suspect."],"tags":["audio","asr","app-config","console-api","model-provider"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}