Jump to content

sales_invoices - TimeoutError - The backend has not responded within 28s while proxying this request


 Share

Recommended Posts

Hi, our customer keeps getting this error when posting some big invoices:

{"Url":"https://api.accounting.sage.com/v3.1/sales_invoices","CorrelationId":"80000e48-0004-4c00-b63f-84710c7967bb","Method":"POST","Request":"{\"sales_invoice\…
…"ResponseCode":"GatewayTimeout","Response":"{\"$severity\":\"error\",\"$dataCode\":\"TimeoutError\",\"$message\":\"The backend has not responded within 28s while proxying this request. Please try again later.\",\"$source\":\"Proxy\"}"}

Every time they try the invoices are created in their Sage account.

How can we solve this issue?

Thanks, Marco

Link to comment
Share on other sites

Hi,

Thank you for your question. You don't state which Sage product this is in relation to and have posted in the General forum so I will assume you're integration is with Sage Business Cloud Accounting. Please let me know if this is not the case.

Timeouts are due to the number of item_lines being passed.

We have services in the backend which validate the ledger accounts and tax_rate id's passed in each and every item line. It looks as if the backend service cannot process this number of item lines in the 28 seconds before the API Gateway times out.

One option would be to incorporate the use of idempotency and then re-try any failed 504 requests after a number of seconds. I found re-trying after 15 seconds provided me with the 201 created response, but this time will vary depending on the number of item lines and the server load at any specific point in time.

Idempotency

Information, documentation, guides and resources for Sage developers

developer.sage.com

Thanks


Mark

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...