adding apierrors class