Skip to content

handle missing projectId in get_device response#126

Merged
mguida22 merged 1 commit intomainfrom
guida/fg-12083-handle-missing-projectId
Jun 18, 2025
Merged

handle missing projectId in get_device response#126
mguida22 merged 1 commit intomainfrom
guida/fg-12083-handle-missing-projectId

Conversation

@mguida22
Copy link
Copy Markdown
Member

Changelog

Handle missing projectId in get_device response

Docs

None

Description

Gracefully handle a missing Project ID in device methods. The projectId field is optional on the API response that these methods call.

@linear
Copy link
Copy Markdown

linear Bot commented Jun 18, 2025

@mguida22 mguida22 requested review from bryfox, jtbandes and wimagguc June 18, 2025 22:34
Comment thread foxglove/client.py
Comment on lines 539 to +540
"properties": device["properties"] if "properties" in device else None,
"project_id": device["projectId"],
"project_id": device["projectId"] if "projectId" in device else None,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup: these could use .get() which doesn't throw

@mguida22 mguida22 merged commit 029e0dd into main Jun 18, 2025
1 check passed
@mguida22 mguida22 deleted the guida/fg-12083-handle-missing-projectId branch June 18, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants