diff options
Diffstat (limited to 'job-qmp.c')
-rw-r--r-- | job-qmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -146,8 +146,9 @@ static JobInfo *job_query_single(Job *job, Error **errp) .status = job->status, .current_progress = job->progress_current, .total_progress = job->progress_total, - .has_error = !!job->error, - .error = g_strdup(job->error), + .has_error = !!job->err, + .error = job->err ? \ + g_strdup(error_get_pretty(job->err)) : NULL, }; return info; |