adjust an error message
This commit is contained in:
parent
6ff3e68921
commit
99386b1662
@ -1,3 +1,4 @@
|
||||
import { CustomError, errorCodes } from "../interfaces";
|
||||
import { scheduleNames, supportedSchedule } from "../types/scheduledEventTypes";
|
||||
|
||||
export function findInScheduleTypes(inputString: string): supportedSchedule {
|
||||
@ -7,7 +8,7 @@ export function findInScheduleTypes(inputString: string): supportedSchedule {
|
||||
// `sheepName` comes from the list of `sheepNames` so the compiler is happy.
|
||||
return scheduleName;
|
||||
}
|
||||
throw new Error('That is not a schedule name.');
|
||||
throw new CustomError('That is not a schedule name.', errorCodes.schedule_not_supported);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user