apigee/trireme — pull request #75 by t-beckmann (2014-07-24 09:31:21+00:00)
Title: fix to emit error objects such that npm recognizes SSL errors

The method handleSSLError() is called passing a string as error message in all places. However, the event emitter did not emit Error objects but just the message string. Notice also, the error message is prefixed by 'SSL Error: ' because NPM checks the error object's message for that string to detect whether an error is caused by some SSL processing. In Trireme, the message originates either from hard coded texts or from SSLExceptions in some cases.