{"record":{"id":"7309b39612fbdbb9","repo":"supabase/supabase","slug":"failed-to-test-edge-function-7309b3","errorCode":null,"errorMessage":"Failed to test edge function","messagePattern":"Failed to test edge function","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"apps/studio/pages/api/edge-functions/test.ts","lineNumber":100,"sourceCode":"    const responseHeaders: Record<string, string | string[]> = {}\n    response.headers.forEach((value, key) => {\n      const existing = responseHeaders[key]\n      if (existing === undefined) {\n        responseHeaders[key] = value\n      } else if (Array.isArray(existing)) {\n        existing.push(value)\n      } else {\n        responseHeaders[key] = [existing, value]\n      }\n    })\n\n    return res.status(200).json({\n      status: response.status,\n      headers: responseHeaders,\n      body: responseBody,\n    })\n  } catch (error: any) {\n    return res.status(500).json({\n      status: 500,\n      error: {\n        message: error.message || 'Failed to test edge function',\n      },\n    })\n  }\n}\n","sourceCodeStart":82,"sourceCodeEnd":108,"githubUrl":"https://github.com/supabase/supabase/blob/beee91b9c2228dd57302dec75c733baaa84ab543/apps/studio/pages/api/edge-functions/test.ts#L82-L108","documentation":"Error \"Failed to test edge function\" thrown in supabase/supabase.","triggerScenarios":"Thrown at apps/studio/pages/api/edge-functions/test.ts:100 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"beee91b9c2228dd57302dec75c733baaa84ab543","analyzedAt":"2026-08-12T06:51:48.935Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}