Skip to content

Instantly share code, notes, and snippets.

@MihailoJoksimovic
Created July 9, 2013 08:01
Show Gist options
  • Save MihailoJoksimovic/5955540 to your computer and use it in GitHub Desktop.
Save MihailoJoksimovic/5955540 to your computer and use it in GitHub Desktop.
this.getWebuserDetailsStore().sync({
failure: function(batch, options) {
var errorCode = this.getReader().jsonData.error_code;
switch(errorCode) {
case 11: // Duplicate email
var errorMessage = Translation.EmailAlreadyExistsPleaseUseAnother;
break;
default:
var errorMessage = Translation.AnErrorHasOccured;
break;
}
Ext.defer(function() {
Ext.Msg.alert(Translation.Warning, errorMessage);
}, 50);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment