Payload 基础 URL 无效
发生此问题时,API 会返回 422 Unprocessable Content。其 type 为 https://lingo.dev/docs/api/errors/payload-base-url-invalid。所有错误的通用结构,请参阅错误和状态码。
基础 URL 必须是公共互联网上的 Payload 实例的 HTTPS 地址,例如 https://cms.example.com,而 "<baseUrl>" 不符合这一要求。Worker 无法访问私有网络:请使用公共主机名对外开放该实例,或通过隧道提供访问。
字段#
除标准成员 type、status、title 和 detail 外,响应体还包含以下字段。detail 文本根据这些字段生成,因此客户端也可以显示自定义文本。
| 字段 | 类型 |
|---|---|
baseUrl | string |
示例#
json
{
"detail": "The base URL must be the https address of a Payload instance on the public internet, such as https://cms.example.com, and \"<baseUrl>\" is not. A Worker cannot reach a private network: expose the instance on a public hostname, or put a tunnel in front of it.",
"baseUrl": "<baseUrl>",
"type": "https://lingo.dev/docs/api/errors/payload-base-url-invalid",
"status": 422,
"title": "Payload base URL invalid"
}