From 1fa3fa75ee447b9919585e02c7997e3f1de9c8a7 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 17 Mar 2021 19:37:35 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20wrong=20error=20type=20=F0=9F=91=80?= =?UTF-8?q?=F0=9F=91=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #160 --- src/models/actions/create/CreateTrackScan.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/actions/create/CreateTrackScan.ts b/src/models/actions/create/CreateTrackScan.ts index 7befe33..80ad4d6 100644 --- a/src/models/actions/create/CreateTrackScan.ts +++ b/src/models/actions/create/CreateTrackScan.ts @@ -1,5 +1,5 @@ import { IsInt, IsOptional, IsPositive } from 'class-validator'; -import { NotAcceptableError } from 'routing-controllers'; +import { BadRequestError } from 'routing-controllers'; import { getConnection } from 'typeorm'; import { RunnerCardNotFoundError } from '../../../errors/RunnerCardErrors'; import { RunnerNotFoundError } from '../../../errors/RunnerErrors'; @@ -70,7 +70,7 @@ export class CreateTrackScan { */ public async getStation(): Promise { if (!this.station) { - throw new NotAcceptableError("You are missing the station's id!") + throw new BadRequestError("You are missing the station's id!") } const station = await getConnection().getRepository(ScanStation).findOne({ id: this.station }, { relations: ["track"] }); if (!station) {