reset button loading... state on error (#4231)

including test
refactored error display some