Преглед изворни кода

Handle error in ExportsController

Michael Mazour пре 8 година
родитељ
комит
19e07485bc
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      services/web/app/coffee/Features/Exports/ExportsController.coffee

+ 1 - 0
services/web/app/coffee/Features/Exports/ExportsController.coffee

@@ -8,6 +8,7 @@ module.exports =
 		{project_id, brand_variation_id} = req.params
 		{project_id, brand_variation_id} = req.params
 		user_id = AuthenticationController.getLoggedInUserId(req)
 		user_id = AuthenticationController.getLoggedInUserId(req)
 		ExportsHandler.exportProject project_id, user_id, brand_variation_id, (err, export_data) ->
 		ExportsHandler.exportProject project_id, user_id, brand_variation_id, (err, export_data) ->
+			return next(err) if err?
 			logger.log 
 			logger.log 
 				user_id:user_id
 				user_id:user_id
 				project_id: project_id
 				project_id: project_id