tls: throw an error, not string

Reviewed-By: Fedor Indutny <fedor@indutny.com>