updated error handling for invalid set ids