Handling errors that come through in lib/client