My Products
Help
adrianm
PARTNER

Timeout gives 500

by adrianm

Oskar Jansson wrote:

>“What return code for timeout will be?”

> 504 Gateway Timeout.

 

I tested this by sending 1000 rows to https://api.finance.visma.net/v2/journaltransaction

 

The response I got after a couple of minutes was

{ "statusCode": 500, "message": "Internal server error", "activityId": "a4fa4137-330b-44b1-9ac4-a411d7ed7a7e" }

 

(the journal was created)

2 REPLIES 2

by Oskar Jansson

After discussions with the R&D team, one reason for receiving a 500 instead of a 504 in this case could be:

 

The backend system (Financials) began sending a 500 error before the connection was lost, so the error code couldn't be changed once the connection broke.

 

Even if the API management timeout was set to 30 minutes instead of 4 minutes, you would still receive a 500 error from Financials, unaffected by the timeout setting. 

 

If there's no check for an active connection, a document might still be created despite the 500 error. The reason for the 500 error will determine whether the document is created. If it's due to a timeout and there's no connection check, the document might be created. If the error is for another reason, the document might not be created.

by Oskar Jansson

Hi @adrianm, investigating this.