Skip to content

Commit

Permalink
refactor: remove label add exception handling in service
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-soltech committed Oct 30, 2023
1 parent 973755d commit 0ae87c0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/components/partner/partner.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,17 @@ export class PartnerService {
}

if (languagesOfConsulting) {
await this.repo.updateRelationList({
id: partner.id,
relation: 'languagesOfConsulting',
label: 'Language',
newList: languagesOfConsulting,
});
try {
await this.repo.updateRelationList({
id: partner.id,
relation: 'languagesOfConsulting',
newList: languagesOfConsulting,
});
} catch (e) {
throw e instanceof InputException
? e.withField('partner.languagesOfConsulting')
: e;
}
}

return await this.readOne(input.id, session);
Expand Down

0 comments on commit 0ae87c0

Please sign in to comment.