Skip to content

Conversation

@lstocchi
Copy link
Contributor

This commit extracts ErrorDescription from the updated Hyperv job object fetched inside WaitJob to provide an updated description of the error.

What happens is that Hyper-V starts the job in background and immediately returns a reference to it which is saved by the BeginInvoke().Out() to an object. If we do not refresh this object, it's like we are always working on an old snapshot and the description will never be updated.

Inside WaitJob the object is actually re-fetched and it contains the updated error message. By reusing it, we can provide a detailed error description instead of just error code.

it fixes #216

@lstocchi
Copy link
Contributor Author

@evidolob not sure if this solves all your issues but this is what i was writing about on slack. Feel free to update it

@lstocchi lstocchi marked this pull request as draft January 20, 2026 17:34
@baude
Copy link
Member

baude commented Jan 20, 2026

what is here LGTM.

This commit extracts ErrorDescription from the updated Hyperv job object fetched inside WaitJob.

What happens is that Hyper-V starts the job in background and immediately returns a
reference to it which is saved by the BeginInvoke().Out() to an object.
If we do not refresh this object, it's like we are always working on an old
snapshot and the description will never be updated.

Inside WaitJob the object is re-fetched and it contains the updated
error message. By reusing it, we can provide a detailed error
description instead of just error code.

Signed-off-by: lstocchi <lstocchi@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

show user friendly error messages instead of error codes

2 participants