From af1ad482d4dd9cf65cc2895896c19f0ecf9d879d Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 9 Dec 2020 18:53:36 +0100 Subject: [PATCH] Now throwing errors to the next instance ref #13 --- src/models/actions/CreateRunnerTeam.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/models/actions/CreateRunnerTeam.ts b/src/models/actions/CreateRunnerTeam.ts index 98429cb..21a6af9 100644 --- a/src/models/actions/CreateRunnerTeam.ts +++ b/src/models/actions/CreateRunnerTeam.ts @@ -35,7 +35,12 @@ export class CreateRunnerTeam extends CreateRunnerGroup { let newRunnerTeam: RunnerTeam = new RunnerTeam(); newRunnerTeam.name = this.name; - newRunnerTeam.parentGroup = await this.getParent(); + try { + newRunnerTeam.parentGroup = await this.getParent(); + } catch (error) { + throw error; + } + newRunnerTeam.contact = await this.getContact() return newRunnerTeam;