概述
API 请求失败时,服务端会返回一个 JSON 格式的响应体。它可以用于定位具体错误原因。如:
{"msg": "file or directory not found", "code": 40400001, "id": "11e4a729d24943409933a5e8314cd32e"}
字段说明
code
:错误码。具体含义见 API 错误码表。msg
:错误的简单描述。id
:又拍云为该请求生成的唯一 ID。
API 错误码表
如遇 5xx 错误,请反馈给售后或您的商务经理。
HTTP 状态码 | 返回代码 | 含义 | 详细说明 |
400 | 40001000 | wrong uri | URI 路径设置错误 |
400 | 40001001 | wrong content-md5 | content-md5 值与文件的 MD5 值不符 |
400 | 40001003 | meta invalid | meta 元素值无效 |
400 | 40001004 | folder args invalid | 目录参数无效 |
400 | 40001005 | iter args invalid | 分页参数无效 |
400 | 40001006 | type invalid | 上传文件内容值无效 |
400 | 40001007 | block invalid | 分块参数无效 |
400 | 40001008 | list type not support | 数组参数无效 |
400 | 40001009 | invalid update time | 更新时间无效 |
400 | 40001011 | invalid append position | 作图参数错误 |
400 | 40001021 | invalid utf8 key | UTF-8 解码错误 |
400 | 40001041 | request wrong type | 请求类型错误 |
400 | 40001042 | request wrong timestamp | 请求时间戳错误 |
400 | 40001043 | request wrong column | 作图参数错误 |
400 | 40001044 | request wrong list | 作图参数错误 |
400 | 40001045 | not found | 请求路径不存在 |
400 | 40001046 | wrong length | 请求长度错误 |
400 | 40001047 | wrong check column | 作图参数错误 |
400 | 40001051 | encode data error | 时间加密错误 |
400 | 40001052 | decode data error | 时间解密错误 |
400 | 40001055 | record has been changed | 在上传这个文件的这段时间内,服务端的文件被修改了。类似打开文件编辑后保存,编辑器提醒你文件已经被修改了 |
400 | 40001161 | wrong range | Range 参数值错误 |
400 | 40001022 | wrong multipart action | 分块请求错误 |
400 | 40001023 | wrong multipart uuid | 分块请求任务 ID 错误 |
400 | 40001024 | wrong multipart type | 分块类型错误 |
400 | 40001025 | wrong multipart length | 分块长度错误 |
400 | 40001027 | wrong multipart size | 分块资源总大小错误 |
400 | 40001030 | wrong multipart part id | 分块 ID 错误 |
400 | 40001031 | duplicate multipart part | 分块已被弃用 |
400 | 40001032 | oversize multipart part | 分块数大小超出错误 |
400 | 40001033 | overflow multipart part | 分块数超出错误 |
400 | 40001034 | unexpect multipart length | 分块大小不一致 |
400 | 40001035 | notfound multipart uuid | 分块任务不存在 |
400 | 40001036 | completed multipart | 请求已结束的分块任务 |
400 | 40001037 | incomplete multipart parts | 分块未上传完毕发起了结束分块请求 |
400 | 40001038 | invalid append file | 表单添加上传资源无效 |
400 | 40000000 | storage bad request | 请求违法 |
400 | 40000001 | need save-key | policy 中未添加 save-key |
400 | 40000002 | need body | FORM API 上传未指定表单 |
400 | 40000003 | need bucket name | policy 中未添加服务名 |
400 | 40000004 | need expiration | policy 中未添加过期时间戳 |
400 | 40000005 | need file | FORM API 上传表单中未指定上传资源,或者上传资源为非 file 形式 |
400 | 40000006 | content md5 not match | MD5 不匹配 |
400 | 40000007 | need policy | 表单未添加 policy |
400 | 40000008 | need signature | policy 中未添加请求签名 |
400 | 40000009 | decode policy error | policy 加密错误 |
400 | 40000010 | data too long for ext-param | 自定义内容超出 255 个字节 |
400 | 40000011 | chunked request bodies not supported yet | 上传不支持 chunked 传输 |
400 | 40000012 | write file to fs error | 视频转码错误 |
400 | 40000013 | need content-md5 but no body provided | 签名 MD5 值和请求体不相符(FORM API) |
400 | 40000014 | need content-md5 but no content provided | 签名 MD5 值和请求体不相符(REST API) |
400 | 40000015 | missing required arguments | 缺少必要请求参数 |
400 | 40000016 | missing file_hash argument | 缺少 file_hash 参数 |
400 | 40000017 | missing file_blocks argument | 缺少 file_blocks 参数 |
400 | 40000018 | too many file blocks | 请求错误 |
400 | 40000019 | missing file_size argument | 缺少 file_size argument |
400 | 40000020 | missing save_token argument | 缺少 save_token argument |
400 | 40000021 | missing block_index argument | 缺少 block_index argument |
400 | 40000022 | missing block_hash argument | 缺少 block_hash argument |
400 | 40000023 | block already exists | block 已存在 |
400 | 40000024 | block not finished | block 任务未完成 |
400 | 40000025 | file size not match | 文件大小不匹配 |
400 | 40000026 | block index out of range | block 下标越界 |
400 | 40000027 | block size too small, at least 100KB | block 块大小低于要求的 100KB |
400 | 40000028 | block size too large, at most 5MB | block 大小高出规定的 5MB |
400 | 40000030 | path encoding should be utf8 | 没有使用 UTF-8 来编码 path |
400 | 40000031 | filename should be utf8 | filename 需要使用 UTF-8 编码 |
400 | 40000032 | ffmpeg args error | 视频转码参数错误 |
400 | 40000033 | failed to read firstchunk | 第一块内容读取失败 |
400 | 40000034 | client error | 客户端错误 |
400 | 40000035 | need purge body | 未提供刷新内容 |
400 | 40000036 | uri bucket must be same as param bucket | 请求路径中的服务名和请求参数中的服务名不一致 |
400 | 40000037 | unknown service | 服务不存在 |
400 | 40000038 | no boundary defined in Content-Type | 表单类型错误 |
400 | 40000039 | Content-Length is equal to 0 | 请求大小为 0 |
400 | 40000040 | source bucket not equal target bucket | 源服务和操作服务名不一致 |
400 | 40000041 | source key equals to target key | 源服务 key 与操作服务 key 一致 |
400 | 40000042 | source key wrong | 源服务 key 错误 |
400 | 40000044 | need metadata | 需要配置元数据 |
400 | 40010001 | not enough arguments | 参数个数错误 |
400 | 40010002 | url not allowed | url 不允许请求 |
400 | 40010003 | tasks number error | 异步任务数量错误 |
400 | 40010029 | only 1~10 tasks supported in get | 异步任务数量错误 |
400 | 40010033 | decode tasks error | 异步任务编码错误 |
400 | 40011091 | invalid app name | 异步任务标识名错误 |
400 | 40011092 | invalid file ttl | ttl 值无效 |
401 | 40100001 | need date header | 未携带 Date 请求头 |
401 | 40100002 | date offset error | 请求签名过期 |
401 | 40100003 | unknown realm in authorization header | Authorization 请求的签名值装配错误 |
401 | 40100004 | need authorization header | 未携带 Authorization 头部 |
401 | 40100005 | signature error | 请求签名错误 |
401 | 40100006 | user not exists | 操作员不存在 |
401 | 40100007 | user blocked | 操作员停用 |
401 | 40100008 | user blocked in this bucket | 请求存储空间停用了该操作员 |
401 | 40100009 | user password error | 操作员密码错误 |
401 | 40100010 | account not exist | 账户不存在 |
401 | 40100011 | account blocked | 账户已停用 |
401 | 40100012 | bucket not exist | 服务名不存在 |
401 | 40100013 | bucket blocked | 服务已关闭 |
401 | 40100014 | bucket removed | 服务已关闭 |
401 | 40100015 | bucket read only | 服务仅允许读操作 |
401 | 40100016 | invalid date value in header | Date 值不符合规范 |
401 | 40100017 | user need permission | 操作员未授予权限 |
401 | 40100018 | account inactivate | 账户未激活 |
401 | 40100019 | account forbidden | 账户禁用 |
401 | 40100020 | account reject | 账户拒绝 |
401 | 40100021 | overdue account | 账户欠费 |
401 | 40100022 | uri prefix error | uri 前缀配置错误 |
401 | 40100023 | uri postfix error | uri 后缀配置错误 |
401 | 40100024 | expire error | 过期时间戳错误 |
401 | 40100025 | auth error | 鉴权错误 |
403 | 40300001 | file name contains invalid chars (\r\n\t) | 保存路径中有不允许的字符 |
403 | 40300002 | file path too long | 保存路径过长 |
403 | 40300003 | file name too long | 保存名过长 |
403 | 40300004 | bucket is full | 服务空间容量已满 |
403 | 40300005 | directory not empty | 目录不为空 |
403 | 40300006 | authorization has expired | 签名已过期 |
403 | 40300007 | content md5 not match | 请求 MD5 和请求内容的 MD5 值不匹配 |
403 | 40300008 | file too small | 文件太小 |
403 | 40300009 | file too large | 文件太大 |
403 | 40300010 | file type error | 文件类型错误 |
403 | 40300011 | has no permission to delete | 操作员没有删除权限 |
403 | 40300012 | need content-type | 未设置文件类型 |
403 | 40300013 | form api disabled | 未开启文件秘钥 |
403 | 40300014 | order must be asc or desc | 目录信息排序仅支持 asc 或者 desc |
403 | 40300015 | path is not a file, maybe a directory | 保存路径未指明文件保存名 |
403 | 40300016 | content-secret only accept [a-zA-Z0-9] | 文件秘钥仅支持大小写的 A-Z 以及数字 0-9 |
403 | 40300017 | no thumb setting found for bucket | 未查询到对应的缩略图版本 |
403 | 40300018 | not an image | 请求资源不是图片类型 |
403 | 40300019 | image width too small or too big | 图片宽超出大小限制 |
403 | 40300020 | image height too small or too big | 图片高超出大小限制 |
403 | 40300021 | image limit exceeded | 图片超出处理限制 |
403 | 40300022 | invalid image-width-range | 图片宽值设置超出限制 |
403 | 40300024 | exceed max size | 超出处理最大体积限制 |
403 | 40300025 | wrong content-type header | content-type 值错误 |
403 | 40300026 | need content-length header | 未设置 content-length 请求头 |
403 | 40300027 | request body too big | 请求体超出请求限制 |
403 | 40300028 | request has expired | 请求过期 |
403 | 40300035 | content-length of policy format error | content-length 或 policy 组装不合法 |
404 | 40400001 | file or directory not found | 请求资源不存在 |
404 | 40400002 | base64 decoded err | base64 解码失败 |
404 | 40401004 | Not found, mark as deleted | 请求资源不存在 |
404 | 40401005 | Not found, block deleted | 请求资源不存在 |
404 | 40401006 | type invalid | 资源无效 |
406 | 40600001 | dir not acceptable | 目录不接受请求 |
406 | 40600002 | folder already exists | 目录已存在 |
406 | 40600003 | single-copy bucket not support form api | 服务不支持 FORM API 请求 |
408 | 40800001 | read client request timeout | 客户端请求超时 |
412 | 41200001 | precondition failed | 处理失败 |
413 | 41300001 | content length too large | 请求大小超出限制 |
415 | 41500001 | media type error, need content-type | 文件类型错误 |
429 | 42900001 | too many requests | 请求触发限制 |
429 | 42900002 | too many requests of the same uri | 同一个 uri 路径请求过多触发限制 |
429 | 42900004 | request banned | 请求被禁止 |
429 | 42900005 | bandwidth limit | 带宽触发限制 |
429 | 42900006 | too many auth check | 相同请求过多触发限制 |
429 | 42900007 | concurrent put or delete | 同一个资源路径并发上传或者删除触发限制 |
429 | 42900008 | too many meta requests | 请求资源触发限制 |
503 | 50300000 | unknown error | 系统错误 |
503 | 50300002 | decode error | 解码错误 |
503 | 50300007 | capture file from fs error | 同一秒内同一个文件只能执行一次修改操作 |
503 | 50300009 | get body temp file error | |
503 | 50300010 | read body temp file error | |
503 | 50300011 | capture file from ffmpeg error | |
503 | 50300012 | service error in thumb | |
503 | 50300013 | put file capture timeout | 内部服务超时了 |
503 | 50300014 | get client socket error | |
503 | 50300015 | decode image info error | |
503 | 50300016 | get image info error | |
503 | 50300017 | failed to new md5 | |
503 | 50300018 | failed to new form | |
503 | 50300020 | put file capture error | |
503 | 50300022 | new resource error | |
503 | 50300023 | connect to db error | |
503 | 50300024 | get master failed | |
503 | 50300025 | write info error | |
503 | 50300026 | get data error | |
503 | 50300027 | put file to fs error | |
503 | 50300028 | get file from fs error | |
503 | 50300029 | unknow error | |
503 | 50300030 | upstream closed connection | |
503 | 50300031 | read upstream timeout | |
503 | 50300032 | wrong data | |
503 | 50300033 | new resource error | |
503 | 50300034 | get info errors | |
503 | 50300036 | send to kafka error | |
503 | 50300038 | failed to new httpipe | |
503 | 50300039 | failed to get client body reader | |
503 | 50300040 | wrong config | |
503 | 50300041 | connect to db error | |
503 | 50300042 | delete path error | |
503 | 50300043 | put task to nsq error | |
503 | 50300044 | avalon list dir error | |
599 | 59900001 | sync call timeout | |
599 | 59900002 | sync call closed by target | |
599 | 59900003 | sync call failed | |
599 | 59900004 | purge timeout | |
599 | 59900005 | purge closed by target | |
599 | 59900006 | purge call failed | |
599 | 59900007 | async delete fail | |
444 | 44400003 | client abort | 请求端请求错误 |
444 | 44400004 | put capture broken pipe | 上传请求断开 |
444 | 44400005 | connection reset by client | 客户端重置了上传请求 |
400 | 40010030 | invalid x-av-b header | |
400 | 40010031 | invalid x-av-ac header | |
400 | 40010032 | invalid x-av-f header | |
400 | 40011001 | invalid x-gmkerl-type | |
400 | 40011002 | invalid x-gmkerl-value | |
400 | 40011003 | invalid x-gmkerl-unsharp | |
400 | 40011004 | invalid x-gmkerl-quality | |
400 | 40011005 | invalid x-gmkerl-exif-switch | |
400 | 40011006 | invalid x-gmkerl-gifto | |
400 | 40011007 | invalid x-gmkerl-webp | |
400 | 40011008 | invalid x-gmkerl-format | |
400 | 40011009 | invalid x-gmkerl-crop | |
400 | 40011010 | invalid x-gmkerl-rotate | |
400 | 40011011 | invalid x-gmkerl-gaussblur | |
400 | 40011012 | invalid x-gmkerl-compress | |
400 | 40011013 | invalid x-gmkerl-progressive | |
400 | 40011014 | invalid x-gmkerl-noicc | |
400 | 40011015 | invalid x-gmkerl-watermark-switch | |
400 | 40011016 | invalid x-gmkerl-watermark-align | |
400 | 40011017 | invalid x-gmkerl-watermark-margin | |
400 | 40011018 | invalid x-gmkerl-watermark-opacity | |
400 | 40011019 | invalid x-gmkerl-watermark-animate | |
400 | 40011020 | invalid x-gmkerl-watermark-font | |
400 | 40011021 | invalid x-gmkerl-watermark-text | |
400 | 40011022 | invalid x-gmkerl-watermark-color | |
400 | 40011023 | invalid x-gmkerl-watermark-border | |
400 | 40011024 | invalid x-gmkerl-watermark-size | |
400 | 40011025 | invalid x-gmkerl-gradient-orientation | |
400 | 40011026 | invalid x-gmkerl-gradient-pos | |
400 | 40011027 | invalid x-gmkerl-gradient-startcolor | |
400 | 40011028 | invalid x-gmkerl-gradient-stopcolor | |
400 | 40011029 | invalid x-gmkerl-extract-func | |
400 | 40011030 | invalid x-gmkerl-extract-color-count | |
400 | 40011031 | invalid x-gmkerl-extract-offset | |
400 | 40011032 | invalid x-gmkerl-extract-palette | |
400 | 40011033 | invalid x-gmkerl-canvas | |
400 | 40011034 | invalid x-gmkerl-canvas-color | |
400 | 40011035 | invalid param in thumb | |
400 | 40011050 | invalid app name | |
400 | 40011051 | invalid x-upyun-part-id | |
400 | 40011052 | invalid x-upyun-multi-length | |
400 | 40011053 | invalid x-upyun-multi-type | |
400 | 40011054 | invalid x-upyun-part-size | |
400 | 40011055 | invalid multipart stage | |
400 | 40011056 | invalid x-upyun-multi-uuid | |
400 | 40011057 | invalid UTF8 Key | |
400 | 40011058 | x-upyun-multi-uuid not found | |
400 | 40011059 | file already upload | 文件已上传 |
400 | 40011060 | file md5 not match | 文件 MD5 不匹配 |
400 | 40011061 | part id error | 分块上传 ID 错误 |
400 | 40011062 | part already complete | 分块上传任务已完成 |
如有疑问请 联系我们