Skip to content

Commit

Permalink
Sanketika-Obsrv/issue-tracker#157: changed error code name
Browse files Browse the repository at this point in the history
  • Loading branch information
yashashkumar committed May 13, 2024
1 parent b97442c commit fbd0dfb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const createQueryTemplate = async (req: Request, res: Response) => {

const { validTemplate } = await validateTemplate(requestBody);
if (!validTemplate) {
logger.error({ apiId, msgid, resmsgid, requestBody: req?.body, message: `Invalid template provided, A template should consist of variables ${requiredVariables} and type of json,sql`, code: "QUERY_TEMPLATE_INVALID" })
return ResponseHandler.errorResponse({ statusCode: 400, message: `Invalid template provided, A template should consist of variables ${requiredVariables} and type of json,sql`, errCode: "BAD_REQUEST", code: "QUERY_TEMPLATE_INVALID" }, req, res)
logger.error({ apiId, msgid, resmsgid, requestBody: req?.body, message: `Invalid template provided, A template should consist of variables ${requiredVariables} and type of json,sql`, code: "QUERY_TEMPLATE_INVALID_INPUT" })
return ResponseHandler.errorResponse({ statusCode: 400, message: `Invalid template provided, A template should consist of variables ${requiredVariables} and type of json,sql`, errCode: "BAD_REQUEST", code: "QUERY_TEMPLATE_INVALID_INPUT" }, req, res)
}

const data = transformRequest(requestBody, templateName);
Expand Down

0 comments on commit fbd0dfb

Please sign in to comment.