Added centralized code to prevent stack traces in cases where the client cancels the communication

Resolves #260