Skip to content

Commit

Permalink
add back special_keys_api_failure error check
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-rjenkins authored and jzhou77 committed Jan 24, 2022
1 parent d3055cc commit ff0d1e5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fdbcli/SetClassCommand.actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,14 @@ ACTOR Future<bool> setProcessClass(Reference<IDatabase> db, KeyRef network_addre
wait(safeThreadFutureToFuture(tr->commit()));
return true;
} catch (Error& e) {
wait(safeThreadFutureToFuture(tr->onError(e)));
state Error err(e);
if (e.code() == error_code_special_keys_api_failure) {
std::string errorMsgStr = wait(fdb_cli::getSpecialKeysFailureErrorMessage(tr));
// error message already has \n at the end
fprintf(stderr, "%s", errorMsgStr.c_str());
return false;
}
wait(safeThreadFutureToFuture(tr->onError(err)));
}
}
}
Expand Down

0 comments on commit ff0d1e5

Please sign in to comment.