import { ServiceResponse , ServiceResult , ServiceException } from '@mds-core/mds-service-helpers' ; import logger from '@mds-core/mds-logger' ; import { RepositoryError } from '@mds-core/mds-repository' ; import { GetJurisdictionsOptions , JurisdictionDomainModel , JurisdictionIdType } from '../../@types' ; import { JurisdictionRepository } from '../repository' ; export const getJurisdiction = async ( jurisdiction_id , options ? ) : Promise < ServiceResponse < JurisdictionDomainModel > > => { try { const jurisdiction = await JurisdictionRepository . readJurisdiction ( jurisdiction_id , options ) ; return ServiceResult ( jurisdiction ) ; } catch ( error ) { const exception = ServiceException ( 'Error Reading Jurisdiction' , RepositoryError ( error ) ) ; logger . error ( exception , error ) ; return exception ; } } ;