Change SendGridService to use array access for errors instead of object access