vendredi 27 mars 2020

Log ERRORs html form post to external url

My API brings the client to my domain API request contains a parameter called return_url where after process is complete on my domain it will post on client's return url along with response parameter.

To do this, redirect to return url, I have code as following:

<form action="http://client-return-url.com" method="post" name='returnform'>
    <input type="hidden" name="request_id">
    <input type="hidden" name="status">
</form>
<script>
    window.onload = function(){
      document.forms['returnform'].submit();
    }
</script>

This works fine.

Is there a way I can save a log if there is error, for example the return url is incorrect url that doesn't exist, or there is a 500 error due to some code issue on return url.

Again, return url is not in my control, the moment I do a form post control is away from me, but I want to inform my clients of any error when I do form post on their.

Thanks,

K



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/39pjJRx
via IFTTT

Aucun commentaire:

Enregistrer un commentaire