Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,11 @@ async def commission_with_code(
:return: The NodeInfo of the commissioned device.
"""
if not network_only and not self.server.bluetooth_enabled:
raise NodeCommissionFailed("Bluetooth commissioning is not available.")
raise NodeCommissionFailed(
"Bluetooth commissioning is not available. "
"Ensure a Bluetooth adapter is configured in the Matter Server settings, "
"or use network_only mode if the device is already on the network."
)

node_id = self._get_next_node_id()
LOGGER.info(
Expand All @@ -342,7 +346,7 @@ async def commission_with_code(
raise RuntimeError("Returned Node ID must match requested Node ID")
except ChipStackError as err:
raise NodeCommissionFailed(
f"Commission with code failed for node {node_id}."
f"Commission with code failed for node {node_id}: {err}"
) from err

LOGGER.info("Matter commissioning of Node ID %s successful.", node_id)
Expand Down Expand Up @@ -428,7 +432,7 @@ async def commission_on_network(
raise RuntimeError("Returned Node ID must match requested Node ID")
except ChipStackError as err:
raise NodeCommissionFailed(
f"Commissioning failed for node {node_id}."
f"Commissioning failed for node {node_id}: {err}"
) from err

LOGGER.info("Matter commissioning of Node ID %s successful.", node_id)
Expand Down Expand Up @@ -595,7 +599,9 @@ async def _interview_node(self, node_id: int) -> None:
)
)
except ChipStackError as err:
raise NodeInterviewFailed(f"Failed to interview node {node_id}") from err
raise NodeInterviewFailed(
f"Failed to interview node {node_id}: {err}"
) from err

# Set label if specified and needed
if self._default_fabric_label:
Expand Down
2 changes: 1 addition & 1 deletion matter_server/server/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ async def find_or_establish_case_session(
if attempt >= retries:
# when we're out of retries, raise NodeNotResolving
raise NodeNotResolving(
f"Unable to establish CASE session with Node {node_id}"
f"Unable to establish CASE session with Node {node_id}: {err}"
) from err
await asyncio.sleep(2 + attempt)
finally:
Expand Down