Fixed wrong error type 👀👀
continuous-integration/drone/pr Build is passing Details

ref #160
This commit is contained in:
Nicolai Ort 2021-03-17 19:37:35 +01:00
parent c8882ae6a1
commit 1fa3fa75ee
1 changed files with 2 additions and 2 deletions

View File

@ -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<ScanStation> {
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) {