Skip to content

Commit

Permalink
Show query parameters in response body
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Jan 6, 2015
1 parent 8c77def commit 0ae7a40
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,16 @@ ascii.write("guardian", "Thick", function (art) {
var args;

if (typeof req.session === 'undefined' || !req.session.data) {
return res.json(500, {
var error = {
code: 'MISSING_SESSION_DETAILS',
message: 'Session details are missing, perhaps the redirect url is on another server or the request timed out.'
});
};

if (Object.keys(req.query).length) {
error.parameters = req.query
}

return res.json(500, error);
}

// Parse session data
Expand Down

0 comments on commit 0ae7a40

Please sign in to comment.