MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / formatError

Function formatError

server/api/TemplateRoute.js:31–39  ·  view source on GitHub ↗
(error, res)

Source from the content-addressed store, hash-verified

29 };
30
31 const formatError = (error, res) => {
32 if (error.message === "401") {
33 return res.status(401).send({ error: "Not authorized" });
34 }
35 if (error.message === "404") {
36 return res.status(404).send({ error: "Not Found" });
37 }
38 return res.status(400).send(error);
39 };
40
41 /*
42 ** Route to get all the templates from a team

Callers 1

TemplateRoute.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected