Handle errors when creating or changing permission