Skip to content

Commit

Permalink
Update proxy.js
Browse files Browse the repository at this point in the history
err.code does not return "oauth.v2.InvalidApiKey" it returns "access_denied". 

Debug log:
 apigee Verify response: {"error":"oauth.v2.InvalidApiKey","error_description":"com.apigee.oauth.v2.OauthAdaptorVerificationException{ code = oauth.v2.InvalidApiKey, message = Invalid ApiKey, associated contexts = []}"} +391ms
  proxy error: {"code":"access_denied","statusCode":403} +2s
  • Loading branch information
sudheergopalam committed Mar 16, 2015
1 parent a78d6c5 commit dc5340e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function verifyAPIKey(req, next) {
debug('error: %j', err);

// only return error to client on invalid key
if (err.code === 'oauth.v2.InvalidApiKey') {
if (err.code === 'access_denied') {
return next(err);
}
}
Expand Down

0 comments on commit dc5340e

Please sign in to comment.