Manage errors (both from server and client side)

These changes make the action deferred fail on error