Function Status Code

Last updated: 2021-07-15 11:18:04

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

    Status Code and Status Message Description Solution
    200
    Success
    The execution is successful. -
    400
    InvalidParameterValue
    The input parameters are incorrect. The parameter does not conform to the specification. Please modify it as instructed in Introduction and try again.
    401
    InvalidCredentials
    The verification fails. The verification fails. Your account does not have the permission to manipulate this function. Please check the permission and try again. For more information, please see the authorization description in Permission Management Overview.
    404
    InvalidSubnetID
    The subnet ID is invalid. Check whether the network configuration of the function is correct and whether the subnet ID is valid.
    405
    ContainerStateExited
    The container exits. Please check your image or bootstrap file to see whether it can be properly started locally.
    406
    RequestTooLarge
    The request body size is too large. The request event size exceeds the upper limit, which is 6 MB for sync request events or 128 KB for async ones.
    407
    The size of response exceeds the upper limit (6MB)
    The size of function response exceeds the upper limit of 6 MB. The size of function response exceeds the upper limit of 6 MB. Please adjust it and try again.
    410
    InsufficientBalance
    The account balance is insufficient. The SCF service is suspended because the Tencent Cloud account has overdue payments. Please top up and try again.
    429
    ResourceLimit
    The container request rate is too high. The container request rate is too high. Please try again later.
    430
    User code exception caught
    A user code execution error occurs. Based on the error log on the console, check the error stack of the code and see whether the code can be executed properly.
    432
    ResourceLimitReached
    The concurrency limit is reached. Container resource usage exceeds the upper limit (the number of concurrent functions * 2). Please adjust the code or submit a ticket to increase the function concurrency limit.
    433
    TimeLimitReached
    The function execution times out.
    • Check whether a large number of time-consuming operations exists in the service code.
    • Set a longer timeout period on the **FUNCTION Configuration** page. 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.
    • Check the code logic to see whether there is a memory leak.
    • 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.
    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. The parameter does not conform to the specification. Please modify it as instructed in Introduction and try again.
    437
    HandlerNotFound
    The function package is loaded incorrectly. The function entry file is not found. Please check whether the entry file name in the code package matches the handler settings and whether the code package is normal. For more information on the handler, please see Execution method.
    438
    FunctionStatusError
    The function is exceptional or the SCF service is suspended.
    • The function is invoked in an exceptional state. Please wait for the function status to become normal and try again.
    • The SCF service is suspended because the Tencent Cloud account has overdue payments. Please top up and try again.
    439
    User preocess exit when running
    The user process exits accidentally. Based on the error message, find out the cause and fix the function code.
    440
    BorrowContainerDegrade
    The borrowed container circuit breaker is triggered. The borrowed container circuit breaker is triggered. This may be because that the expansion speed or concurrency exceeds the limit. Please submit a ticket to increase the expansion speed or concurrency quota.
    441
    UnauthorizedOperation
    CAM authentication fails. Check whether the CAM authentication parameters for the function invoker are passed correctly. For more information, please see the authorization description in Permission Management Overview.
    442
    QualifierNotFound
    The specified version is not found. The function version does not exist. Please check the function version and try again.
    443
    UserCodeError
    A user code execution error occurs. Based on the error log on the console, check the error stack of the code and see whether the code can be executed properly.
    444
    PullImageFailed
    Image pull fails. Please check the integrity and validity of the selected image and try again; for example, check whether it can be downloaded locally. If the problem persists, please submit a ticket.
    445
    ContainerInitError
    Container start fails. Container start fails. Please check whether your bootstrap file has been uploaded successfully and ensure that the invocation path is correct.
    446
    PortBindingFailed
    Port listening fails. The initialization of the container exceeds the maximum time of 30s. Please check whether the listening port is 9000.
    447
    PullImageTimeOut
    Image pull times out. It may be a timeout caused by a large image or network jitters. Please minimize the image and try again. If the problem persists, please submit a ticket.
    450
    InitContainerTimeout
    The user code container times out. The user code container times out (15s). Please check the code and try again. If the problem persists, please submit a ticket.
    449
    InsufficientResources
    The memory resources are insufficient. The memory resources are insufficient. Please try again later.
    500
    InternalError
    An internal error occurs. An internal error occurs. Please try again later. If the problem persists, please submit a ticket.

    Concepts

    Execution method

    The execution method specifies the starting file and function while invoking the cloud function as shown below:

    • For Go programming, use the FileName format, such as main.

    • For Python, Node.js, or PHP programming, use the FileName.FunctionName format, such as 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" in Basic Concepts.
    • For Java programming, use the package.class::method format, such as example.Hello::mainHandler.

    • For the Custom Runtime environment, a non-fixed format can be used based on the custom programming language implementation.