Cloud Function Status Code

Last updated: 2020-10-26 17:32:57

    If an error code is returned after the function is executed, you can find the cause and solution by referring to the following table.

    Status Code and Status Message Description Solution
    200
    Success
    The execution is successful. -
    400
    BadRequest
    The input parameters are incorrect.
    • Check whether the input parameters are correct based on the error message.
    • The parameters are invalid. Please revise the parameters by referring to API Documentation and retry.
    401
    InvalidCredentials
    The verification fails. -
    403
    ResourceUnavailable
    The resource is unavailable. -
    404
    InvalidSubnetID
    The subnet ID is invalid. Check whether the Network configuration of the function is correct and whether the subnet ID is valid.
    406
    RequestTooLarge
    The request body size is too large.
    • Reduce the request body size based on the product documentation.
    • Based on the request body size, determine whether the parameter value is too large. For sync requests, the limit is 6 MB; for async requests, the limit is 128 KB.
    430
    UserFunctionExecError
    User code execution error occurs. Based on the error log on the Console, check the error stack of code and see whether the code can be executed properly.
    432
    ResourceLimitReached
    The concurrence limit is reached. You can submit a ticket to increase the concurrence limit.
    433
    TimeLimitReached
    Function execution timed out.
    • Check whether a large number of time-consuming operations exist in the service code.
    • Set a longer timeout period. If the current timeout period has been set to the maximum value, you can submit a ticket to increase the timeout limit.
    434
    MemoryLimitReached
    The memory limit is reached.
    • Set a larger memory size on the "Function configuration" page. If the current memory size has been set to the maximum value, you can submit a ticket to increase the memory limit.
    • Check the code logic to see if memory leak exists.
    435
    FunctionNotFound
    The function is not found. Check whether the function is deleted, or whether the function information that is used as the input parameter is correct.
    436
    InvalidParameterValue
    The parameter is invalid. -
    437
    HandlerNotFound
    The function package is loaded incorrectly. Check whether the handler is correctly configured. For more information, please see Execution Method.
    438
    FunctionStatusError
    SCF service is suspended because the Tencent Cloud account is in arrears. -
    439
    UserProcExitError
    User process exists accidentally. Based on the error message, find out the cause and fix the function code.
    441
    UnauthorizedOperation
    CAM authentication fails. The request is unauthorized. For more information, please see Cloud Access Management.
    442
    QualifierNotFound
    The specified version is not found. The function version does not exist. Please check the function version and retry.
    500
    InternalError
    Internal error occurs. -
    532
    ResourceExhausted
    Computing resources are insufficient. -

    Concepts

    Execution method

    Execution method specifies which function in which file is executed first when the cloud function is invoked, as shown in the following figure.

    • For Golang programming, use the FileName format, for example, main.
    • For Python, Node.js, or PHP programming, use the FileName.FunctionName format, for example, index.main_handler.
      • Please note that FileName does not include the file name extension, and FunctionName is the name of the entry function. Ensure that the file name extension matches the programming language. For example, for Python programming, the file name extension is .py; and for Node.js programming, the file name extension is .js. For more information, please see Execution Method.
    • For Java programming, use the package.class::method format, for example, example.Hello::mainHandler.
    • For the Custom Runtime environment, a non-fixed format can be used based on the custom programming language implementation.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help