FEATURE: Add detailed error messages

FEATURE: Add detailed error messages

Resolves https://github.com/discourse/discourse-graphviz/issues/3

Please enter the commit message for your changes. Lines starting

diff --git a/assets/javascripts/initializers/discourse-graphviz.js.es6 b/assets/javascripts/initializers/discourse-graphviz.js.es6
index 91fb18d..252e5ed 100644
--- a/assets/javascripts/initializers/discourse-graphviz.js.es6
+++ b/assets/javascripts/initializers/discourse-graphviz.js.es6
@@ -35,10 +35,10 @@ export default {
         .then(svgChart => {
           $container.html(svgChart);
         })
-        .catch(() => {
-          // graphviz error are unhelpful so we just show a default error
+        .catch(e => {
+          // graphviz errors are very helpful so we just show them as is
           const $error = $(
-            "<div class='graph-error'>Error while rendering graph.</div>"
+            "<div class='graph-error'>" + e.message + "</div>"
           );
           $container.html($error);
         });

GitHub sha: da4ee0e1

This commit appears in #5 which was merged by SamSaffron.