ENG-7169: wrap errors in callback if requested.