How can I find the exact cause of the error when I am getting '0 Unknown HTTP error'?"

Goutham Yeluri 0 Reputation points
2025-08-12T09:12:46.42+00:00
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 35,766 Reputation points Volunteer Moderator
    2025-08-12T09:42:42.53+00:00

    Hello Goutham !

    Thank you for posting on Microsoft Learn.

    In the Azure portal, open your Function and then go to Code + Test.

    Open your browser DevTools under Network and click Test/Run again.

    Look for the failing request (and its preflight OPTIONS call).

    • If you see (canceled) or status 0, it didn’t reach your app (CORS, access restrictions, proxy, TLS, ad-blocker...)
    • If you see a real HTTP code (401/403/5xx), your app was hit and you can use logs

    I found a similar old thread https://learn.microsoft.com/en-us/answers/questions/1694089/functionapps-are-failing-with-0-unknown-http-error

    Microsoft’s own guidance: the portal’s Test/Run requires CORS to allow https://portal.azure.com (and usually https://ms.portal.azure.com). ([Microsoft Learn](https://learn.microsoft.com/en-us/answers/questions/1694089/functionapps-are-failing-with-0-unknown-http-error'FunctionApps are failing with "0 Unknown HTTP error" - Microsoft Q&A'))

    Recently, many users found that relying on Service Tag = AzureCloud no longer lets Test/Run through so you must explicitly allow your client IP in Networking under Access restrictions for the function app. Once whitelisted, Test/Run works again.

    https://stackoverflow.com/questions/78611024/cannot-execute-azure-function-from-portal-0-unknown-http-error-failed-to-f

    Under CORS Allowed origins, if you enabled Allow credentials, you can’t use * as origin instead use explicit origins.

    0 comments No comments

Your answer

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