AWS控制台Api网关:解析网关响应

时间:2020-07-13 11:11:50

标签: amazon-web-services api aws-lambda aws-api-gateway api-gateway

我一直在尝试为错误的请求正文类型的响应解析网关响应,这是我到目前为止得到的:

configuration

现在的响应是:

{
    message:  "Invalid request body",
    type: error,
    success: false,
    errors: [object has missing required properties ([\"color\"])]
}

问题是:

我想解析这样的错误:

{
    message:  "Invalid request body",
    type: error,
    success: false,
    errors: [
      {
        property: "color",
        message:"missing"
      },
      {
       property: "color",
       message:"missing"
      }
   ]
}

有什么办法吗?也许使用招摇或OPEN API

先谢谢您

0 个答案:

没有答案