tls: throw an error, but a string

We should throw an Error object, but a string.