fix: include available device IDs in device lookup error messages#325
Open
nuthalapativarun wants to merge 1 commit intomicrosoft:pre-releasefrom
Open
fix: include available device IDs in device lookup error messages#325nuthalapativarun wants to merge 1 commit intomicrosoft:pre-releasefrom
nuthalapativarun wants to merge 1 commit intomicrosoft:pre-releasefrom
Conversation
When a caller passes an unknown device ID to assign_task_to_device,
connect_device, or get_device_status, the previous error messages
("Device X is not registered") gave no hint of what valid IDs exist.
Include the full list of registered device IDs in every not-found
error so callers can immediately see the valid options without
additional debugging.
Author
|
Hi team — gentle ping on this PR. Happy to rebase or address any feedback if needed. Let me know if there's anything blocking review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a caller passes an unknown device ID to
assign_task_to_device,connect_device, orget_device_status, the previous error messages ("Device X is not registered") gave no hint of what valid IDs exist, making debugging difficult in multi-device constellation setups.Changes
Updated three error paths in
galaxy/client/device_manager.pyto include the full list of currently registered device IDs:connect_device— log message now includesavailable_device_idsassign_task_to_device—ValueErrormessage now includesavailable_device_idsget_device_status— returned error dict now includesavailable_device_idsTesting
Verified that calls with an unrecognised device ID now produce messages such as: