Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'v0.12'

  • Loading branch information...
commit 68b24f13ea48537e51213ea68d7f9d4d49e200bf 2 parents ebab04b + bada9ce
Matthew Eernisse mde authored
1  lib/controller/responder/index.js
View
@@ -18,6 +18,7 @@ responder.strategies = {
html: htmlStrategy
, json: apiStrategy
, xml: apiStrategy
+, txt: apiStrategy
};
responder.Responder = function () {
11 lib/controller/responder/strategies/api.js
View
@@ -60,7 +60,18 @@ var utils = require('utilities')
, message: content.message
, stack: content.stack
};
+
+ // Transfer the statusCode from the Error object to the
+ // options, to be spit out in the response
options.statusCode = content.statusCode || 500;
+
+ // Plaintext needs a reasonable way to get a string other
+ // than stupid [Object object]
+ if (options.format == 'txt') {
+ response.toString = function () {
+ return this.message;
+ };
+ }
}
else {
throw new Error(
4 package.json
View
@@ -8,7 +8,7 @@
"MVC",
"realtime"
],
- "version": "0.12.3",
+ "version": "0.12.4",
"author": "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
"dependencies": {
"jake": "0.7.x",
@@ -27,7 +27,7 @@
"main": "./lib/geddy",
"repository": {
"type": "git",
- "url": "git://github.com/mde/geddy.git"
+ "url": "git://github.com/geddy/geddy.git"
},
"preferGlobal": true,
"devDependencies": {
Please sign in to comment.
Something went wrong with that request. Please try again.