changed responseError to use enum

keep as enum for type safety