Skip to content

Conversation

@PengTian0
Copy link
Contributor

I tried to access API without token or with a wrong token and just got an empty object.
Cause:
The returned info object is a list.
But the code uses it as a dictionary which contains "message".

@iceiilin
Copy link
Member

iceiilin commented Nov 3, 2016

👍

@PengTian0
Copy link
Contributor Author

}
else if (!user){
res.status(UNAUTHORIZED_STATUS).send({message: challenges.message});
res.status(UNAUTHORIZED_STATUS).send({message: challenges[0].message});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check all challenges and return all error messages, not just the first one. Maybe the first one is a successful message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your catching!
I will fix that.

@lanchongyizu
Copy link
Member

👍 after fix houndci problems.

@PengTian0
Copy link
Contributor Author

Jenkins: test this please

@yyscamper yyscamper merged commit 7a48de3 into RackHD:master Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants