require 'dmao/ingesters/generic/ingester' require 'dmao/ingesters/errors/ingest_project_error' module DMAO module Ingesters module Generic class ProjectsIngester < Ingester ENTITY = DMAO::API::Project ENTITY_ERROR = DMAO::Ingesters::Errors::IngestProjectError ENTITY_ERROR_MESSAGE = "Invalid project details" ERROR_HANDLING = { "DMAO::API::Errors::ProjectNotFound" => "Project not found, cannot update project that does not exist", "DMAO::API::Errors::InstitutionNotFound" => "Institution not found, cannot ingest project to non-existent institution", "DMAO::API::Errors::InvalidOrganisationUnitID" => "Organisation unit not found, cannot ingest project linked to non-existent organisation unit" } end end end end