Skip to content

Commit

Permalink
bus/driver: mention peer-name on activation failure errors
Browse files Browse the repository at this point in the history
Include the name of the activated peer in D-Bus errors when propagating.
We already build custom error descriptions so it is simple to include a
bit more information.

Reported-by: Jake Dane
Signed-off-by: David Rheinsberg <[email protected]>
  • Loading branch information
dvdhrm committed Jan 11, 2024
1 parent b71a541 commit 6189c10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bus/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,12 @@ int driver_name_activation_failed(Bus *bus, Activation *activation, uint64_t ser
if (!activation->pending || serial != activation->pending)
return 0;

r = asprintf(&error, "Could not activate remote peer: %s.", controller_name_error_to_human_readable(name_error));
r = asprintf(
&error,
"Could not activate remote peer '%s': %s",
activation->name->name,
controller_name_error_to_human_readable(name_error)
);
if (r < 0)
return error_origin(-errno);

Expand Down

0 comments on commit 6189c10

Please sign in to comment.