default ajax config: show/hide spinner and display error alerts