Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(api): Change InvalidAssertions error code to 401
Browse files Browse the repository at this point in the history
Based on comments in mozilla/fxa-oauth-server#234
  • Loading branch information
rishibaldawa committed Jun 8, 2015
1 parent ef8c47a commit 2781b3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/error.js
Expand Up @@ -90,7 +90,7 @@ AppError.unknownClient = function unknownClient(clientId) {

AppError.incorrectSecret = function incorrectSecret(clientId) {
return new AppError({
code: 400,
code: 401,
error: 'Bad Request',
errno: 102,
message: 'Incorrect secret'
Expand Down
2 changes: 1 addition & 1 deletion test/api.js
Expand Up @@ -631,7 +631,7 @@ describe('/v1', function() {
code: unique.code().toString('hex')
}
}).then(function(res) {
assert.equal(res.statusCode, 400);
assert.equal(res.statusCode, 401);
assert.equal(res.result.message, 'Incorrect secret');
}).done(done, done);
});
Expand Down

0 comments on commit 2781b3a

Please sign in to comment.