From 1efce743dd76120f64ca436e62ebce7fb73c0df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= <165856+hramos@users.noreply.github.com> Date: Sun, 26 Nov 2017 21:59:28 -0800 Subject: [PATCH] Provide additional debugging information (#241) --- lib/server/readCategories.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server/readCategories.js b/lib/server/readCategories.js index 4f47a78eac..9df51664a3 100644 --- a/lib/server/readCategories.js +++ b/lib/server/readCategories.js @@ -57,8 +57,8 @@ function readCategories(sidebar) { if (!articles[metadata.next]) { throw new Error( metadata.version - ? `Improper sidebars file for version ${metadata.version}. Make sure that all documents with ids specified in this version's sidebar file exist and that no ids are repeated.` - : `Improper sidebars.json file. Make sure that documents with the ids specified in sidebars.json exist and that no ids are repeated.` + ? `Improper sidebars file for version ${metadata.version}, document with id '${metadata.next}' not found. Make sure that all documents with ids specified in this version's sidebar file exist and that no ids are repeated.` + : `Improper sidebars.json file, document with id '${metadata.next}' not found. Make sure that documents with the ids specified in sidebars.json exist and that no ids are repeated.` ); } previous[articles[metadata.next].id] = metadata.id;