How to add custom field values to contact

Do you have connection issues with your server?

This is what a 502 error is:
https://www.lifewire.com/g00/502-bad-gateway-error-explained-2622939?i10c.referrer=https%3A%2F%2Fwww.google.co.uk%2F

Have you tried any other API call, and does it work okay?

I do not have any Server issues. Please see below what i want with error codes
so if an error 500 occurs the script should try again after 1s if not successful, second retry after 5 seconds and we need to be able to define these retries at a central place

Any 5xx error returned means that the server is denying the call and the script never completes running. You can’t retry anything when the server stops the process. Take the script one line at a time and place die() after each line one by one. When you find the one that duplicates the server error you will know where to focus.

okay i will check and let you know

This helped me a lot, thank you! :smiley_cat:

The 502 Bad Gateway Error is an indication that something has gone wrong within the server of your application, as opposed to the client side request.

How to Fix a 502 Error

Perform a hard-refresh in your browser. On Macs, this is done by pressing Cmd + Shift + R.

This problem is due to poor IP communication between back-end computers, possibly including the Web server at the site you are trying to visit. Before analysing this problem, you should clear your browser cache completely.

If you get this problem for only some of the Web sites you try to visit then it is likely to be a problem at those sites i.e. one of their pieces of equipment is failing/overloaded. Contact the people at those sites.

If you are surfing the Web and see this problem for all Web sites you try to visit, then either 1) your ISP has a major equipment failure/overload or 2) there is something wrong with your internal Internet connection e.g. your firewall is not functioning correctly. In the first case, only your ISP can help you. In the second case, you need to fix whatever it is that is preventing you reaching the Internet.