add error code for image