Share via

Issue with executing a second function in the Azure Function App

Mridul Lahori 5 Reputation points
2024-04-22T19:42:26.7233333+00:00

Hello,

I have deployed an Azure Function App to generate some Agency Reports. There are two functions in the functions app script -

  1. GenerateAgencyReports
  2. GenerateExcelReports

When I invoke GenerateExcelReports function through Postman using a POST Call on my local, it executes and provide a response as expected, but when I run it through Postman by invoking the Azure function app service, it fails with 500 internal server error

GenerateAgencyReports works fine on both local and Azure function app service.

What could be the issue?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Luis Arias 9,536 Reputation points Volunteer Moderator
    2024-04-22T21:05:19.5733333+00:00

    Hi Mridul Lahori,

    This 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the server, but the server could not be more specific on what the exact problem is. Here are some possible reasons:

    • Code Issue: The problem might be with the code of the GenerateExcelReports function. It could be trying to access a resource that’s available locally but not in Azure.
    • Environment Variables: Ensure all necessary environment variables and application settings are correctly set in Azure. They might be present locally but missing or incorrect in Azure.
    • Dependencies: If your function depends on certain packages, ensure those packages are installed and properly configured in Azure.

    Cheers,

    Luis

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.