From 34b4eac3c1f655075813ac8c03167c9e78562aa5 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 11 Mar 2015 15:54:34 +0900 Subject: [PATCH] Throw on error --- server/search.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/search.js b/server/search.js index 670a079..4a75cfb 100644 --- a/server/search.js +++ b/server/search.js @@ -266,10 +266,17 @@ function accessReview(query, callback) { throw err; } + var pitcher = function(err, info) { + if (err) { + throw err; + } + }; + for (var categoryId in query.profile) { pool.query( 'INSERT INTO historyGroups(categoryId, categoryValue, historyId) VALUES(?, ?, ?)', - [categoryId, query.profile[categoryId], info.insertId] + [categoryId, query.profile[categoryId], info.insertId], + pitcher ); } });