question

MohsenAkhavan avatar image
0 Votes"
MohsenAkhavan asked ·

Azure Function error on Data Factory , 3608 Error - Call to provided Azure function 'testhttpmohsen' failed with status-'NotFound' and message - 'Invoking Azure function failed with HttpStatusCode - NotFound.'

I have an Azure function (HTTP Trigger) and run correctly. When I add this function to Azure Data Factory and run Debug, I received this error.

77285-image.png


my code is:

 import logging
    
 import azure.functions as func
    
    
 def main(req: func.HttpRequest) -> func.HttpResponse:
     logging.info('Python HTTP trigger function processed a request.')
    
     name = req.params.get('name')
     if not name:
         try:
             req_body = req.get_json()
         except ValueError:
             pass
         else:
             name = req_body.get('name')
    
     if name:
         return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
    
     else:
         return func.HttpResponse(
              "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.",
              status_code=200
         )



azure-data-factoryazure-functions
image.png (52.6 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered ·

Hi @MohsenAkhavan

I have looked into the backend logs and I can see that your function app is in the "Stopped" state. Please start your function app by navigating to your function app. The error is expected if there is no function found with the request URL.

77619-image.png

Once you see the status as "Running" please test it and let me know if you are still facing the issue.


image.png (16.7 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.