Fix error of GCP not being recognized
This commit is contained in:
@@ -187,8 +187,8 @@ const handleUpstreamErrors: ProxyResHandlerWithBody = async (
|
|||||||
|
|
||||||
const service = req.key!.service;
|
const service = req.key!.service;
|
||||||
if (service === "gcp") {
|
if (service === "gcp") {
|
||||||
if (Array.isArray(errorPayload.error)) {
|
if (Array.isArray(errorPayload)) {
|
||||||
errorPayload.error = errorPayload.error[0];
|
errorPayload = errorPayload[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user