Skip to content

Commit

Permalink
Merge pull request #275 from icefoganalytics/test
Browse files Browse the repository at this point in the history
 More logging on error
  • Loading branch information
datajohnson authored Jun 27, 2024
2 parents 5feeaf9 + 31886f9 commit 9dc30f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/routes/admin/csg-threshold-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ReturnValidationErrors } from "@/middleware";
import { cleanNumber, cleanNumberOptional } from "@/models";
import moment from "moment";
import { AssessmentCslftRepositoryV2 } from "@/repositories";
import logger from "@/utils/logger";

const db = knex(DB_CONFIG);

Expand Down Expand Up @@ -167,6 +168,7 @@ csgThresholdRouter.put(
return res.status(200).json({ data: "Assessment Saved" });
} catch (error) {
console.log("CATCHING", error);
logger.error(error);
return res.status(400).json({ error });
}
}
Expand Down Expand Up @@ -318,6 +320,7 @@ csgThresholdRouter.get(
}
} catch (error) {
console.log("catcing error", error);
logger.error(error);
return res.status(400).send("Error loading assessment - " + (error as any).message);
}
}
Expand Down

0 comments on commit 9dc30f7

Please sign in to comment.