summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/auth/SignupView.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-11-01 19:02:50 +0100
committerJules Laplace <julescarbon@gmail.com>2019-11-01 19:02:50 +0100
commit1becc513c36e30ffe7cc967613485fa39d05f203 (patch)
treea47c359b44df36f822553cd66ddd8f0ebc88cb34 /StoneIsland/www/js/lib/auth/SignupView.js
parentc75e4f0b5fc83548e337af6c533036baec8c85c9 (diff)
v1.2.5
Diffstat (limited to 'StoneIsland/www/js/lib/auth/SignupView.js')
-rwxr-xr-xStoneIsland/www/js/lib/auth/SignupView.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js
index 66d8f239..b16ff887 100755
--- a/StoneIsland/www/js/lib/auth/SignupView.js
+++ b/StoneIsland/www/js/lib/auth/SignupView.js
@@ -114,19 +114,19 @@ var SignupView = FormView.extend({
},
error: function(data){
- try {
- data = JSON.parse(data.responseText)
- app.signup.show_errors([[ 'Name', data['Error']['Description'] ]])
- }
- catch (e) {
- switch (data.status) {
- case 409:
- app.signup.show_errors([[ 'Email', "Email is already in use." ]])
- break
- default:
+ switch (data.status) {
+ case 409:
+ app.signup.show_errors([[ 'Email', "Email is already in use." ]])
+ break
+ default:
+ try {
+ data = JSON.parse(data.responseText)
+ app.signup.show_errors([[ 'Name', data['Error']['Description'] ]])
+ }
+ catch (e) {
app.signup.show_errors([[ 'Name', "There was an unknown error." ]])
- break
- }
+ }
+ break
}
},