Fix error of GCP not being recognized

This commit is contained in:
Cg.
2024-06-29 16:45:31 +09:00
parent 02d3e4457b
commit 253cc37509
+2 -2
View File
@@ -187,8 +187,8 @@ const handleUpstreamErrors: ProxyResHandlerWithBody = async (
const service = req.key!.service;
if (service === "gcp") {
if (Array.isArray(errorPayload.error)) {
errorPayload.error = errorPayload.error[0];
if (Array.isArray(errorPayload)) {
errorPayload = errorPayload[0];
}
}