Full text of the error:
Error: write EPROTO SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc
If you encounter such an exception, it could mean that you are trying to access somewhere using https/ssl/tls, but the endpoint does not support it, and supports plain connection/http.
Thanks ingenuity2k.