error rest script