所有文档

          函数计算 CFC

          错误返回

          通用错误返回

          CFC错误响应符合BCE规范,统一为如下格式。后续各接口不再单独列出。

              {
                  "requestId": "47e0ef1a-9bf2-11e1-9279-0100e8cf109a",
                  "code":"NoSuchKey",
                  "message":"The resource you requested does not exist"   
              }

          其中,code为错误码,所有错误码取值来源BCE公共错误码和CFC专有错误码(参考错误码部分内容)。

          公共错误码

          Code Message HTTP状态码 说明
          AccessDenied Access denied. 403 Forbidden 无权限访问对应的资源
          InappropriateJSON The JSON you provided was well-formed and valid, but not appropriate for this operation. 400 Bad Request 请求中的JSON格式正确,但语义上不符合要求。如缺少某个必需项,或者值类型不匹配等。出于兼容性考虑,对于所有无法识别的项应直接忽略,不应该返回这个错误。
          InternalError We encountered an internal error. Please try again. 500 Internal Server Error 所有未定义的其他错误。在有明确对应的其他类型的错误时(包括通用的和服务自定义的)不应该使用。
          InvalidAccessKeyId The Access Key ID you provided does not exist in our records. 403 Forbidden Access Key ID不存在
          InvalidHTTPAuthHeader The HTTP authorization header is invalid. Consult the service documentation for details. 400 BadRequest Authorization头域格式错误
          InvalidHTTPRequest There was an error in the body of your HTTP request. 400 BadRequest HTTP body格式错误。例如不符合指定的Encoding等
          InvalidURI Could not parse the specified URI. 400 BadRequest URI形式不正确。例如一些服务定义的关键词不匹配等。对于ID不匹配等问题,应定义更加具体的错误码,例如NoSuchKey。
          MalformedJSON The JSON you provided was not well-formed. 400 BadRequest JSON格式不合法
          InvalidVersion The API version specified was invalid. 404 NotFound URI的版本号不合法
          OptInRequired A subscription for the service is required. 403 Forbidden 没有开通对应的服务
          IdempotentParameterMismatch The request uses the same client token as a previous, but non-identical request. 412 PreconditionFailed ClientToken对应的API参数不一样。
          SignatureDoesNotMatch The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. Consult the service documentation for details. 400 BadRequest Authorization头域中附带的签名和服务端验证不一致
                 |

          CFC错误码

          Code Message HTTP状态码 说明
          ENILimitReachedException Unable to create an Elastic Network Interface (ENI) in the VPC 400 BadRequest 无法在VPC上创建一个弹性网络接口
          InvalidParameterValueException One of the parameters in the request is invalid 400 BadRequest 存在非法参数
          InvalidRequestContentException The request body could not be parsed as JSON 400 BadRequest 请求主体不能被解析为JSON
          InvalidSecurityGroupIDException The Security Group ID provided in the function VPC configuration is invalid 400 BadRequest 在函数VPC配置中提供的安全组ID是无效的
          InvalidSubnetIDException The Subnet ID provided in the function VPC configuration is invalid 400 BadRequest 在函数VPC配置中提供的子网ID是无效的
          KMSAccessDeniedException Unable to decrypt the environment variables because KMS access was denied 400 BadRequest 无法解密环境变量,因为无法访问访问权限
          KMSDisabledException Unable to decrypt the environment variables because the KMS key used is disabled 400 BadRequest 无法对环境变量进行解密,因为使用的km是禁用的
          KMSInvalidStateException Unable to decrypt the environment variables because the KMS key used is a invalid state for Decrypt 400 BadRequest 无法解密环境变量,因为使用的公里密钥是一个无效的解密状态
          PolicyLengthExceededException Function access policy is limited to 20 KB 400 BadRequest 函数访问策略限制为20 KB
          ServiceException Service encountered an internal error 500 Internal Server Error 服务遇到内部错误
          SubnetIPAddressLimitReachedException Unable to set up VPC access because one or more configured subnets has n availab IP addresses" 400 BadRequest 无法设置VPC访问,因为一个或多个已配置的子网有n个可用的IP地址
          UnsupportedMediaTypeException The content type of the Invoke request body is not JSON 400 BadRequest 调用请求主体的内容类型不是JSON
          ValidationException Validation exception 400 BadRequest 校验出错
          上一篇
          公共请求头与公共响应头
          下一篇
          函数调用接口