handle error when listing stacks