18
src/errors/TrackErrors.ts
Normal file
18
src/errors/TrackErrors.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { JsonController, Param, Body, Get, Post, Put, Delete, NotFoundError, OnUndefined, NotAcceptableError } from 'routing-controllers';
|
||||
import { IsInt, IsNotEmpty, IsPositive, IsString } from 'class-validator';
|
||||
|
||||
export class TrackNotFoundError extends NotFoundError {
|
||||
@IsString()
|
||||
name = "TrackNotFoundError"
|
||||
|
||||
@IsString()
|
||||
message = "Track not found!"
|
||||
}
|
||||
|
||||
export class TrackIdChangeNotAllowedError extends NotAcceptableError {
|
||||
@IsString()
|
||||
name = "TrackIdChangeNotAllowed"
|
||||
|
||||
@IsString()
|
||||
message = "The id's don't match!!"
|
||||
}
|
||||
Reference in New Issue
Block a user