in reply to REST::Client 500 Error

Is there anything else that i can try to prevent this error?

Here are just a few of the things you could try. Note that since you've decided not to say what the exact URL involved is, you won't reap the most benefit of the collective experience of the Monastery. Why have you not provided this very important piece of data?

  1. Try setting appropriate headers.
  2. Make sure you are running the most recent versions of all the relevant modules, particularly Mozilla::CA and IO::Socket::SSL but also LWP::Protocol::https and REST::Client itself of course. Also ensure your version of openssl is up to date.
  3. Use strict and warnings.
  4. Don't even think about not validating the hostname or server certificate. It is 2020 and any remote service with an invalid certificate is not to be trusted.
  5. Try setting a known user agent identifier.
  6. Use 'debug4' with IO::Socket::SSL to trace the TLS connection.
  7. Tell us which version of Perl you are running, on which O/S and, as already mentioned, which precise URL.

🦛