Why do Azure functions report success if HTTP 500 is returned?

Donald Carnegie 6 Reputation points
2021-08-11T09:59:17.857+00:00

Using Python 3.9 and function runtime 3.

The following code results in a HTTP 500 being returned, but the portal reports this as success. Why? Surely this should be a failure?

   except:  
               logging.exception("The error message i want to appear in my logs")  
               return func.HttpResponse(  
                   f"The error message I want the user to see.",  
                   status_code=500,  
               )  

122335-image.png

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,826 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,321 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 21,411 Reputation points MVP
    2021-08-11T11:57:42.93+00:00

    Hi,
    The answer to this is available here.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    2 people found this answer helpful.