Error 500 represents server error.
I would check the server side REST service and the data I am sending.
If its error 500, its a server side error, pls check the server side. The whole problem is from that side.
Hope it helps!
The 500 error is coming from the remote server. It’s probably an error in the data you are trying to send to the server. Maybe a field is in the wrong format or an expected field is missing. If you have admin access to the remote server there is almost certainly something in their logs explaining the error.