Fix where an uninitialized client would throw error on failure.

Might be silly but sometimes on failure, the client might have somehow missed to be initialized or out right was set to null, as it is in the _after method. The _after will be called before _failed and therefore throw an exception where getResponse() is called on a non object. This resolves the issue.