diff --git a/src/api/order/content-types/order/lifecycles.ts b/src/api/order/content-types/order/lifecycles.ts index 52c3293..1687369 100644 --- a/src/api/order/content-types/order/lifecycles.ts +++ b/src/api/order/content-types/order/lifecycles.ts @@ -1,5 +1,6 @@ import { extractId } from '../../../../utils'; +const ERR_MISSING_TIME = 'Не указано время'; const ERR_INVALID_TIME = 'Некорректное время'; const ERR_OVERLAPPING_TIME = 'Время пересекается с другими заказами'; const ERR_INACTIVE_CLIENT = 'Клиент не активен'; @@ -29,7 +30,7 @@ export default { // Проверка корректности времени заказа. if (!time_start || !time_end) { - throw new Error(ERR_INVALID_TIME); + throw new Error(ERR_MISSING_TIME); } if (timeToDate(time_start) >= timeToDate(time_end)) { throw new Error(ERR_INVALID_TIME);