Skip to main content

Notifications

Announcements

No record found.

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

Posted on by
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.
 
 
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 4,598 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
    Nyakinyua 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
  • VaHiX Profile Picture
    VaHiX 3,053 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans