Skip to content

Commit

Permalink
Merge pull request #193 from gwicke/less_spammy_errors
Browse files Browse the repository at this point in the history
Do not include the full request body in errors
  • Loading branch information
Pchelolo committed Jul 27, 2016
2 parents 6225b52 + abbd57a commit 3d50026
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions index.js
Expand Up @@ -90,7 +90,11 @@ RBCassandra.prototype.get = function(rb, req) {
title: 'Error in Cassandra table storage backend',
stack: e.stack,
err: e,
req: req
req: {
uri: req.uri,
headers: req.headers,
body: req.body && JSON.stringify(req.body).slice(0,200)
}
}
};
});
Expand All @@ -114,7 +118,11 @@ RBCassandra.prototype.put = function(rb, req) {
title: 'Internal error in Cassandra table storage backend',
stack: e.stack,
err: e,
req: req
req: {
uri: req.uri,
headers: req.headers,
body: req.body && JSON.stringify(req.body).slice(0,200)
}
}
};
});
Expand All @@ -136,7 +144,11 @@ RBCassandra.prototype.dropTable = function(rb, req) {
title: 'Internal error in Cassandra table storage backend',
stack: e.stack,
err: e,
req: req
req: {
uri: req.uri,
headers: req.headers,
body: req.body && JSON.stringify(req.body).slice(0,200)
}
}
};
});
Expand All @@ -160,7 +172,11 @@ RBCassandra.prototype.getTableSchema = function(rb, req) {
title: 'Internal error querying table schema in Cassandra storage backend',
stack: e.stack,
err: e,
req: req
req: {
uri: req.uri,
headers: req.headers,
body: req.body && JSON.stringify(req.body).slice(0,200)
}
}
};
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "restbase-mod-table-cassandra",
"description": "RESTBase table storage on Cassandra",
"version": "0.10.0",
"version": "0.10.1",
"license": "Apache-2.0",
"dependencies": {
"bluebird": "^3.1.1",
Expand Down

0 comments on commit 3d50026

Please sign in to comment.