Error is not being set in store function

If there's an error in store, the error is not set; and the controller shows an empty dialog.

This fix adds the error setting.

Thanks,