[#32] scenarios: Log object info on errors

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2022-11-10 15:13:55 +03:00 committed by fyrchik
parent 883c3c259a
commit aa1cbb957c

View file

@ -116,7 +116,7 @@ export function obj_write() {
const { payload, hash } = generator.genPayload(registry_enabled);
const resp = grpc_client.put(container, headers, payload);
if (!resp.success) {
console.log(resp.error);
console.log({cid: container, error: resp.error});
return;
}
@ -133,7 +133,7 @@ export function obj_read() {
const obj = obj_list[Math.floor(Math.random() * obj_list.length)];
const resp = grpc_client.get(obj.container, obj.object)
if (!resp.success) {
console.log(resp.error);
console.log({cid: obj.container, oid: obj.object, error: resp.error});
}
}
@ -150,7 +150,7 @@ export function obj_delete() {
const resp = grpc_client.delete(obj.c_id, obj.o_id);
if (!resp.success) {
// Log errors except (2052 - object already deleted)
console.log(resp.error);
console.log({cid: obj.c_id, oid: obj.o_id, error: resp.error});
return;
}