re-format error callbacks