文件大小冲突

了解 FileSizeConflict 错误(422 无法处理的内容)的含义、携带的字段,以及哪些端点会返回此错误。

发生此问题时,API 会返回 422 Unprocessable Content。其 type 为 https://lingo.dev/docs/api/errors/file-size-conflict。所有错误的通用结构请参阅错误和状态码。

文件 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 已声明或已存储的大小为 2 字节,与本次提供的大小不同。一个地址唯一标识一个文件,因此请按文件实际存储的字节数准确声明其大小,并确保所有引用位置的大小一致。

字段 #

除标准成员 type、status、title 和 detail 外,响应体还包含以下字段。detail 文本根据这些字段生成,因此客户端也可以改为显示自定义文本。

字段类型
addressstring
sizesinteger[]

示例 #

JSON
{
  "detail": "File 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 is declared or already stored with different sizes: 2 bytes. An address names one exact file, so declare its exact byte size as stored, the same wherever it appears.",
  "address": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "sizes": [
    2
  ],
  "type": "https://lingo.dev/docs/api/errors/file-size-conflict",
  "status": 422,
  "title": "File size conflict"
}