Fixed messages and comments for RunnerTeamErrors

ref #39
This commit is contained in:
Nicolai Ort 2020-12-20 18:47:42 +01:00
parent 37afc10e44
commit 389f6347c3

View File

@ -3,7 +3,6 @@ import { NotAcceptableError, NotFoundError } from 'routing-controllers';
/** /**
* Error to throw when a runner team couldn't be found. * Error to throw when a runner team couldn't be found.
* Implemented this ways to work with the json-schema conversion for openapi.
*/ */
export class RunnerTeamNotFoundError extends NotFoundError { export class RunnerTeamNotFoundError extends NotFoundError {
@IsString() @IsString()
@ -15,32 +14,29 @@ export class RunnerTeamNotFoundError extends NotFoundError {
/** /**
* Error to throw when two runner teams' ids don't match. * Error to throw when two runner teams' ids don't match.
* Usually occurs when a user tries to change a runner's id. * Usually occurs when a user tries to change a runner team's id.
* Implemented this way to work with the json-schema conversion for openapi.
*/ */
export class RunnerTeamIdsNotMatchingError extends NotAcceptableError { export class RunnerTeamIdsNotMatchingError extends NotAcceptableError {
@IsString() @IsString()
name = "RunnerTeamIdsNotMatchingError" name = "RunnerTeamIdsNotMatchingError"
@IsString() @IsString()
message = "The id's don't match!! \n And if you wanted to change a runner's id: This isn't allowed" message = "The ids don't match!! \n And if you wanted to change a runner's id: This isn't allowed"
} }
/** /**
* Error to throw when a team still has runners associated. * Error to throw when a team still has runners associated.
* Implemented this waysto work with the json-schema conversion for openapi.
*/ */
export class RunnerTeamHasRunnersError extends NotAcceptableError { export class RunnerTeamHasRunnersError extends NotAcceptableError {
@IsString() @IsString()
name = "RunnerTeamHasRunnersError" name = "RunnerTeamHasRunnersError"
@IsString() @IsString()
message = "This team still has runners associated with it. \n If you want to delete this team with all it's runners and teams ass `?force` to your query." message = "This team still has runners associated with it. \n If you want to delete this team with all it's runners and teams add `?force` to your query."
} }
/** /**
* Error to throw when a team still has runners associated. * Error to throw when a team still has runners associated.
* Implemented this waysto work with the json-schema conversion for openapi.
*/ */
export class RunnerTeamNeedsParentError extends NotAcceptableError { export class RunnerTeamNeedsParentError extends NotAcceptableError {
@IsString() @IsString()