未知文件格式
了解 FileFormatUnknown 错误(422 无法处理的内容)的含义、包含的字段,以及哪些端点会返回该错误。
遇到此问题时,API 会返回 422 Unprocessable Content,其 type 为 https://lingo.dev/docs/api/errors/file-format-unknown。所有错误的通用结构请参阅错误和状态码。
无法根据 <path> 的扩展名确定如何读取该文件。支持的扩展名包括 .json、.yaml、.ts、.po、.xliff、.strings、.xcstrings、.arb、.properties、.csv、.md 和 .html。
字段 #
除标准成员 type、status、title 和 detail 外,响应体还包含以下字段。detail 文本由这些字段生成,客户端也可以据此显示自定义文本。
| 字段 | 类型 |
|---|---|
paths | string[] |
示例 #
JSON
{
"detail": "The extension of <path> does not say how to read the file. Supported extensions include .json, .yaml, .ts, .po, .xliff, .strings, .xcstrings, .arb, .properties, .csv, .md and .html.",
"paths": [
"<path>"
],
"type": "https://lingo.dev/docs/api/errors/file-format-unknown",
"status": 422,
"title": "File format unknown"
}