From 26303f2cdba28ba76d88a80dd8b4155a6bdc1f74 Mon Sep 17 00:00:00 2001 From: Alexey Velikiy Date: Sat, 7 Jul 2018 21:38:34 +0300 Subject: [PATCH] some commit --- server/src/routes/analytic_units_router.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/routes/analytic_units_router.ts b/server/src/routes/analytic_units_router.ts index ec00763..dee28bb 100644 --- a/server/src/routes/analytic_units_router.ts +++ b/server/src/routes/analytic_units_router.ts @@ -56,22 +56,22 @@ async function createItem(ctx: Router.IRouterContext) { let body = ctx.request.body; if(body.type === undefined) { - throw new Error(`Missing field: type`); + throw new Error(`Missing field "type"`); } if(body.name === undefined) { - throw new Error(`Missing field: name`); + throw new Error(`Missing field "name"`); } if(body.panelUrl === undefined) { - throw new Error(`Missing field: panelUrl`); + throw new Error(`Missing field "panelUrl"`); } if(body.metric === undefined) { - throw new Error(`Missing field: datasource`); + throw new Error(`Missing field "datasource"`); } if(body.metric.datasource === undefined) { - throw new Error(`Missing field: metric.datasource`); + throw new Error(`Missing field "metric.datasource"`); } if(body.metric.targets === undefined) { - throw new Error(`Missing field: metric.targets`); + throw new Error(`Missing field "metric.targets"`); } const metric: AnalyticUnit.Metric = {