exports.respond = function (res, success, code, message, data, err) {
	if (err)
		console.log(err);
	res
		.status(code)
		.type('application/json')
		.send(JSON.stringify({
			'success': success,
			'statusCode': code,
			'message': message,
			'data': data
		}))
	;
};
@@ -93,16 +93,238 @@
 g(err);%0A
+%09if (code == 500) %7B%0A%09%09if (!success)%0A%09%09%09success = false;%0A%09%09if (!message)%0A%09%09%09message = 'Internal server error';%0A%09%09if (!data)%0A%09%09%09data = %7B'extended': 'A bug seems to have crawled into the server. This is not your fault.'%7D;%0A%09%7D%0A
 %09res%0A%09%09.
@@ -473,16 +473,24 @@
 a': data
+ %7C%7C null
 %0A%09%09%7D))%0A%09

Add defaults for HTTP 500 error