View | Details | Raw Unified | Return to bug 39190
Collapse All | Expand All

(-)a/Koha/File/Transport/SFTP.pm (-7 / +14 lines)
Lines 287-302 sub _abort_operation { Link Here
287
    my $stderr = $self->{stderr_capture};
287
    my $stderr = $self->{stderr_capture};
288
    $self->{stderr_capture} = '';
288
    $self->{stderr_capture} = '';
289
289
290
    my $payload = {
291
        status    => $self->{connection}->status,
292
        error     => $self->{connection}->error,
293
        path      => $path ? $path : $self->{connection}->cwd,
294
        error_raw => $stderr
295
    };
296
290
    $self->add_message(
297
    $self->add_message(
291
        {
298
        {
292
            message => $operation,
299
            message => $operation,
293
            type    => 'error',
300
            type    => 'error',
294
            payload => {
301
            payload => $payload
295
                status    => $self->{connection}->status,
296
                error     => $self->{connection}->error,
297
                path      => $path ? $path : $self->{connection}->cwd,
298
                error_raw => $stderr
299
            }
300
        }
302
        }
301
    );
303
    );
302
304
Lines 304-309 sub _abort_operation { Link Here
304
        $self->{connection}->abort;
306
        $self->{connection}->abort;
305
    }
307
    }
306
308
309
    my $status = {
310
        status     => 'errors',
311
        operations => [ { code => $operation, status => 'error', detail => $payload } ]
312
    };
313
    $self->set( { status => encode_json($status) } )->store();
314
307
    return;
315
    return;
308
}
316
}
309
317
310
- 

Return to bug 39190