re-order params for callback on error