Changed to a more appropriate exception type

As recommend by @gmarz changed from a generic exception to a transport
type exception.