Error Code v2

开发
HTTP/2 400
Content-Type: application/problem+json

{
  "error": {
    "status": 400,
    "type": "a URL that identifies the error type.",
    "title": "a short summary of this error.",
    "detail": "a human-readable explanation for this error.",
    "invalidParams": [
      [
        "invalid or missing params",
        "only available for 400 errors"
      ]
    ]
  }
}

和风天气现已经发布错误码 v2 版本,新版本对 API 错误请求进行了细分和更加详细的描述,以便开发者可以更容易了解错误的原因,同时也将HTTP Status Code与错误码保持了一致。

请参考错误码 v2 的说明文档: https://dev.qweather.com/docs/resource/error-code/

相关文章