mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
include example of failing response
This commit is contained in:
parent
ce3921bec5
commit
7587c68582
1 changed files with 11 additions and 0 deletions
|
@ -44,6 +44,17 @@ class JoinFlow extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
handleRegistrationResponse (err, body, res) {
|
handleRegistrationResponse (err, body, res) {
|
||||||
|
// example of failing response:
|
||||||
|
// [
|
||||||
|
// {
|
||||||
|
// "msg": "This field is required.",
|
||||||
|
// "errors": {
|
||||||
|
// "username": ["This field is required."],
|
||||||
|
// "recaptcha": ["Incorrect, please try again."]
|
||||||
|
// },
|
||||||
|
// "success": false
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
this.setState({waiting: false}, () => {
|
this.setState({waiting: false}, () => {
|
||||||
let errStr = '';
|
let errStr = '';
|
||||||
if (!err && res.statusCode === 200) {
|
if (!err && res.statusCode === 200) {
|
||||||
|
|
Loading…
Reference in a new issue