API 错误码表

技术支持发表于:2016年03月29日 16:48:33更新于:2017年03月29日 16:12:15

API 请求失败时,服务器会返回一个 json 格式的响应体用于定位具体错误原因。如:

{"msg": "file or directory not found", "code": 40400001, "id": "11e4a729d24943409933a5e8314cd32e"}


  • code: 错误码。具体含义请见 API 错误码表

  • msg: 对错误的简单描述。

  • id: UPYUN 为该请求生成的唯一 id。

API 错误码表

HTTP 状态码返回代码含义
40040011001invalid x-gmkerl-type
40040011002invalid x-gmkerl-value
40040011003invalid x-gmkerl-unsharp
40040011004invalid x-gmkerl-quality
40040011005invalid x-gmkerl-exif-switch
40040011006invalid x-gmkerl-gifto
40040011007invalid x-gmkerl-webp
40040011008invalid x-gmkerl-format
40040011009invalid x-gmkerl-crop
40040011010invalid x-gmkerl-rotate
40040011011invalid x-gmkerl-gaussblur
40040011012invalid x-gmkerl-compress
40040011013invalid x-gmkerl-progressive
40040011014invalid x-gmkerl-noicc
40040011015invalid x-gmkerl-watermark-switch
40040011016invalid x-gmkerl-watermark-align
40040011017invalid x-gmkerl-watermark-margin
40040011018invalid x-gmkerl-watermark-opacity
40040011019invalid x-gmkerl-watermark-animate
40040011020invalid x-gmkerl-watermark-font
40040011021invalid x-gmkerl-watermark-text
40040011022invalid x-gmkerl-watermark-color
40040011023invalid x-gmkerl-watermark-border
40040011024invalid x-gmkerl-watermark-size
40040011025invalid x-gmkerl-gradient-orientation
40040011026invalid x-gmkerl-gradient-pos
40040011027invalid x-gmkerl-gradient-startcolor
40040011028invalid x-gmkerl-gradient-stopcolor
40040011029invalid x-gmkerl-extract-func
40040011030invalid x-gmkerl-extract-color-count
40040011031invalid x-gmkerl-extract-offset
40040011032invalid x-gmkerl-extract-palette
40040011033invalid x-gmkerl-canvas
40040011034invalid x-gmkerl-canvas-color
40040000001need save-key
40040000002need body
40040000003need bucket name
40040000004need expiration
40040000005need file
40040000006content md5 not match
40040000007need policy
40040000008need signature
40040000009decode policy error
40040000010data too long for ext-param
40040000011chunked request bodies not supported yet
40040000012write file to fs error
40040000013need content-md5 but no body provided
40040000014need content-md5 but no content provided
40040000015missing required arguments
40040000016missing file_hash argument
40040000017missing file_blocks argument
40040000018too many file blocks
40040000019missing file_size argument
40040000020missing save_token argument
40040000021missing block_index argument
40040000022missing block_hash argument
40040000023block already exists
40040000024block not finished
40040000025file size not match
40040000026block index out of range
40040000027block size too small, at least 100KB
40040000028block size too large, at most 5MB
40040000029save-key encoding should be utf8
40040000030path encoding should be utf8
40040000031filename should be utf8
40040000032ffmpeg args error
40040000033failed to read firstchunk
40040000034client error
40040000035need purge body
40140100001need date header
40140100002date offset error
40140100003unknown realm in authorization header
40140100004need authorization header
40140100005signature error
40140100006user not exists
40140100007user blocked
40140100008user blocked in this bucket
40140100009user password error
40140100010account not exist
40140100011account blocked
40140100012bucket not exist
40140100013bucket blocked
40140100014bucket removed
40140100015bucket read only
40140100016invalid date value in header
40340300001file name contains invalid chars (\r\n\t)
40340300002file path too long
40340300003file name too long
40340300004bucket is full
40340300005directory not empty
40340300006authorization has expired
40340300007content md5 not match
40340300008file too small
40340300009file too large
40340300010file type error
40340300011has no permission to delete
40340300012need content-type
40340300013form api disabled
40340300014order must be asc or desc
40340300015path is not a file, maybe a directory
40340300016content-secret only accept [a-zA-Z0-9]
40340300017no thumb setting found for bucket
40340300018not an image
40340300019image width too small or too big
40340300020image height too small or too big
40340300021image limit exceeded
40340300022invalid image-width-range
40340300023invalid image-height-range
40340300024exceed max size
40340300025wrong content-type header
40340300026need content-length header
40340300027request body too big
40340300028request has expired
40340300029purge too much items
40440400001file or directory not found
40640600001dir not acceptable
40640600002folder already exists
40840800001read client request timeout
41541500001media type error, need content-type
42942900001too many requests
42942900002too many requests of the same uri
50350300000unknown error
50350300001write hub failed
50350300002decode error
50350300003ffmpeg error
50350300006get hub error
50350300007capture file from fs error
50350300008delete hub error
50350300009get body temp file error
50350300010read body temp file error
50350300011capture file from ffmpeg error
50350300012service error in thumb
50350300013put file capture timeout
50350300014get client socket error
50350300015decode image info error
50350300016get image info error
50350300017failed to new md5
50350300018failed to new form
50350300020put file capture error
50350300021put capture broken pipe
50350300022new resource error
50350300023connect to db error
50350300024get master failed
50350300025write info error
50350300026get data error
50350300027put file to fs error
50350300028get file from fs error
50350300029unknow error
50350300030upstream closed connection
50350300031read upstream timeout
50350300032wrong data
50350300033new resource error
50350300034get info errors
50350300035decode hub body error