web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Error 'Http request failed as there is an error: Received an invalid status line: 0' in D365 BC API

(2) ShareShare
ReportReport
Posted on by 6
I am calling the Business Central web services of the custom API page from logic app. I am creating the Sales Header in the Business Central using this web service.
The web service is throwing an error ''Http request failed as there is an error: Received an invalid status line: 0.'. This error is not coming each time. We have the traffic like 2000-3000 web service calls per day and it failed 3-4 times. Also, when I re-run the web service it got succussed with the same web service payload and endpoint.
 
 
Business Central throws the error but that operation was also completed in the Business Central as Purchase Header will be created in BC and error is also received on web service response.
 
I checked it on logic app side, there is no issue on that side. So, Business Central is causing this issue.
 
 
I have the same question (0)
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,137 Super User 2025 Season 2 on at
    Error 'Http request failed as there is an error: Received an invalid status line: 0' in D365 BC API
  • Suggested answer
    YUN ZHU Profile Picture
    92,206 Super User 2025 Season 2 on at
    Error 'Http request failed as there is an error: Received an invalid status line: 0' in D365 BC API
    This seems to be a problem with the Microsoft standard connector. It is recommended to submit an SR to allow Microsoft to assist in investigating this issue.
     
    Hope this helps.
    Thanks.
    ZHU
  • AG-10101328-0 Profile Picture
    6 on at
    Error 'Http request failed as there is an error: Received an invalid status line: 0' in D365 BC API

    I've been consistently facing this particular issue in my integrations developed using Logic Apps. In an attempt to resolve it, I migrated the integrations to Azure Function Apps, hoping the issue wouldn't occur there. Unfortunately, the same problem is also happening with the Function Apps.

     

    Has anyone else encountered this behavior? Any insights or suggestions would be greatly appreciated.

  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,137 Super User 2025 Season 2 on at
    Error 'Http request failed as there is an error: Received an invalid status line: 0' in D365 BC API
    Web service responds with an error, suggesting that the underlying connectivity or service handling may be affected during peak traffic periods. To mitigate this, consider implementing retry logic in your Logic App and closely monitoring the performance of Business Central during high traffic times. Additionally, reviewing the configuration and resource allocation may help improve overall reliability and reduce the frequency of these errors
     
  • Nyakinyua Profile Picture
    55 on at
    Error 'Http request failed as there is an error: Received an invalid status line: 0' in D365 BC API
    Given that the error occurs sporadically and resolves upon retry, you can monitor your Business Central API usage and adjust the request limits
  • Vahid Ghafarpour Profile Picture
    11,965 Super User 2025 Season 2 on at
    Error 'Http request failed as there is an error: Received an invalid status line: 0' in D365 BC API
    One common cause of intermittent HTTP errors is the handling of persistent connections. You can try setting the KeepAlive property to false to ensure that each request establishes a new connection. This can help avoid issues with stale connections.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 4,197

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,673

#3
Sumit Singh Profile Picture

Sumit Singh 2,907

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans