Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5dfca5b

Browse files
committed
display raw, formatted JSON error
1 parent 2f8ba81 commit 5dfca5b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<template name="error_view">
2-
{{getError}}
2+
<pre>{{getError}}</pre>
33
</template>

app/client/templates/error_view.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Template.error_view.onCreated(function() {
33
});
44

55
Template.error_view.helpers({
6-
'getError' : function(){
7-
return JSON.stringify(App.Collections.OrgLogs.findOne(FlowRouter.getParam('_id')),null, '\t');
6+
'getError' : function() {
7+
console.log(App.Collections.OrgLogs.findOne(FlowRouter.getParam('_id')));
8+
return JSON.stringify(App.Collections.OrgLogs.findOne(FlowRouter.getParam('_id')), null, '\t');
89
}
910
})

app/server/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function initOrgs() {
3333
} else {
3434
newLog.statusCode = undefined;
3535
}
36-
newLog.errorMessage = JSON.stringify(e, null, '\t');
36+
newLog.errorMessage = e;
3737
}
3838

3939
var oldLog = App.Collections.OrgLogs.findOne({ 'url': url });

0 commit comments

Comments
 (0)