save error and success handlers