exception_handler: mocking responses on error

In :mock mode, return a fake response when there is an http error or if
the client is disabled.