The messageProperty config option lets you specify an attribute in the JSON response which contains a user generated message. If you return success: false and return the message property with your JSON response, you can catch the message via an exception event listener:
Code:
var store = new JsonStore({
autoLoad: true,
fields: ['price', 'change', 'company', 'pctChange'],
messageProperty: 'message',
root: 'rows',
url: ...,
listeners: {
exception: function(dataProxy, type, action, options, response, mixedArgs) {
Ext.Msg.alert('Error', response.message);
}
}