Skip to content

Commit

Permalink
testmode small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Justus-e committed Jul 22, 2022
1 parent b3e928e commit 2de93a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/endpoints/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ router.get("/metrics", async (req, res) => {
const includeHistoricData = req.query["include-historic"] || "false";
const aggregateInterval = req.query["aggregate-interval"] || "1d";
const createEmpty = req.query["create-empty"] || "false";

joi.assert(
timeRange,
joi.string().pattern(/(\d+(mo|[dwy]))+/, { name: "duration" })
Expand Down
2 changes: 1 addition & 1 deletion src/testmode.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ influx
console.log("Test Data Created in Bucket: 'events-test'");
})
.catch((err) => {
if (err.response.status === 422) {
if (err.response && err.response.status === 422) {
console.warn("Test Bucket already exists");
} else {
throw err;
Expand Down

0 comments on commit 2de93a8

Please sign in to comment.