summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--routes/index.js5
-rw-r--r--views/data.jade7
2 files changed, 9 insertions, 3 deletions
diff --git a/routes/index.js b/routes/index.js
index efed59c..5f2c79c 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -42,7 +42,10 @@ exports.render = function(req, res) {
var parsedBody;
try {
parsedBody = JSON.parse(body);
- } catch(e) { sendErr('Unable to parse JSON: ' + e); }
+ } catch(e) {
+ sendErr('Unable to parse JSON: ' + e);
+ return;
+ }
var collection = collection_json.fromObject(parsedBody).collection;
var isUrl = function(u) {
try {
diff --git a/views/data.jade b/views/data.jade
index 49d0579..78d8b76 100644
--- a/views/data.jade
+++ b/views/data.jade
@@ -66,7 +66,7 @@ block meta
// TODO: Add ability to show the raw part of the collection.
block items
if collection.items.length == 0
- p Collection has to items.
+ p Collection has no items.
else
// p The feed has #{collection.items.length} items.
each item, i in collection.items
@@ -91,7 +91,7 @@ block items
block queries
if collection.queries.length == 0
- p Collection has to queries.
+ p Collection has no queries.
else
each query in collection.queries
- var name = query.prompt || query.name || 'Unnamed query'
@@ -155,6 +155,9 @@ block navbar
block content
if typeof err != 'undefined'
+ section(id='error')
+ div(class='page-error')
+ h1 Error
p Error rendering #{url}
p= err