{"record":{"id":"dd30008a8623409c","repo":"CoplayDev/unity-mcp","slug":"fal-submit-returned-no-request-id-truncated-resp-dd3000","errorCode":null,"errorMessage":"fal submit returned no request_id: {truncated_response}","messagePattern":"fal submit returned no request_id: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs","lineNumber":56,"sourceCode":"\n            var spec = new HttpRequestSpec\n            {\n                Method = \"POST\",\n                Url = url,\n                ContentType = \"application/json\",\n                Body = Encoding.UTF8.GetBytes(BuildBody(model, req).ToString(Formatting.None))\n            };\n            spec.Headers[\"Authorization\"] = \"Key \" + apiKey;\n\n            HttpResult res = await http.SendAsync(spec, ct);\n            JObject json = ParseOk(res, apiKey, \"submit\");\n\n            string responseUrl = json[\"response_url\"]?.ToString();\n            if (string.IsNullOrEmpty(responseUrl))\n            {\n                string requestId = json[\"request_id\"]?.ToString();\n                if (string.IsNullOrEmpty(requestId))\n                    throw new Exception(SecretRedactor.Scrub(\"fal submit returned no request_id: \" + ProviderHttp.Truncate(res?.Text), apiKey));\n                responseUrl = QueueBase + model + \"/requests/\" + requestId;\n            }\n            // The response_url is provider-controlled; refuse to later attach the key to any host\n            // other than the fal queue.\n            ProviderHttp.RequireHost(responseUrl, QueueHost, apiKey, \"fal submit response_url\");\n            return responseUrl;\n        }\n\n        // Duration is catalog-driven: the model's ModelEntry names the request key (seconds_total /\n        // duration) and the clamp bounds. A duration-controllable endpoint (e.g. CassetteAI Music)\n        // always sends a duration >= 1 — a prompt-only body is rejected with fal 422\n        // \"duration Field required\" — while a non-duration model (Lyria) or an unknown model stays\n        // prompt-only.\n        private static JObject BuildBody(string model, AudioGenRequest req)\n        {\n            var body = new JObject { [\"prompt\"] = req.Prompt ?? string.Empty };\n\n            ModelEntry entry = AssetGenModelCatalog.Find(model);","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/CoplayDev/unity-mcp/blob/c21bf496bca87d54e75bad048563c3adb1782081/MCPForUnity/Editor/Services/AssetGen/Providers/FalAudioAdapter.cs#L38-L74","documentation":"The audio adapter mirrors the image adapter: after submitting to fal it expects either 'response_url' or 'request_id'. If both are missing/empty it throws a generic Exception whose message is the truncated response scrubbed of the apiKey. This indicates an unexpected or empty fal response for an audio job.","triggerScenarios":"fal returned HTTP success for an audio submit but the body contained neither 'response_url' nor 'request_id'; the audio model id is wrong and returned an unexpected body; a non-JSON or HTML body was parsed as a 2xx.","commonSituations":"fal audio API shape/version change; using a non-duration model id where the adapter expected a queueable one; auth/quota edge returning an empty body; a proxy altering the response.","solutions":["Inspect the truncated response text in the message (apiKey scrubbed) to see fal's actual body.","Verify the audio model id and submit endpoint are current and queueable per fal's docs.","Check fal status and the model's request requirements (e.g. duration field).","Confirm the API key is valid."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Guard submit inputs; response shape cannot be validated pre-call.\nif (string.IsNullOrEmpty(modelId)) throw new ArgumentException(\"modelId required\");\nif (string.IsNullOrEmpty(apiKey)) throw new ArgumentException(\"apiKey required\");","typeGuard":null,"tryCatchPattern":"for (int attempt = 0; attempt < 3; attempt++)\n{\n    try { return await falAudio.SubmitAsync(model, req, apiKey, http, ct); }\n    catch (Exception ex) when (attempt < 2 && ex.Message.Contains(\"no request_id\"))\n    {\n        await Task.Delay(500 * (attempt + 1), ct);\n    }\n}","preventionTips":["Inspect the truncated, key-scrubbed response text in the message.","Ensure the audio model id is queueable and current per fal's docs.","Include all required fields (e.g. duration) for duration-controllable models."],"tags":["assetgen","fal","network","api","audio"],"backgroundTag":null,"analyzedSha":"c21bf496bca87d54e75bad048563c3adb1782081","analyzedAt":"2026-08-13T17:36:56.095Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}