| 391 | } |
| 392 | |
| 393 | Bytes Provisioner::encode_error(opid_t op_id, seq_t seq, ErrorCode code, const char* msg) { |
| 394 | return pack_response((opid_t)Op::Error, seq, [&](MsgPack::Packer& p) { |
| 395 | p.serialize(MsgPack::map_size_t(msg ? 2 : 1)); |
| 396 | p.serialize((uint16_t)Key::ErrorCodeKey); |
| 397 | p.serialize((ferror_t)code); |
| 398 | if (msg) { |
| 399 | p.serialize((uint16_t)Key::ErrorMessage); |
| 400 | p.serialize(msg); |
| 401 | } |
| 402 | }); |
| 403 | } |
| 404 | |
| 405 | Bytes Provisioner::encode_ack(opid_t op_id, seq_t seq) { |
| 406 | return pack_response(op_id, seq, nullptr); |
nothing calls this directly
no test coverage detected