Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide underlying errors back to client #730

Open
olavt opened this issue May 31, 2024 · 1 comment
Open

Provide underlying errors back to client #730

olavt opened this issue May 31, 2024 · 1 comment
Labels
new-feature New feature or request

Comments

@olavt
Copy link

olavt commented May 31, 2024

It would be nice if more details on the error would be provided back to the client.

Take this example:

info: MatterServerAdmin.Program[0]
MatterServerClient.SendCommandAsync: Sending command:
{
"message_id": "3",
"command": "commission_with_code",
"args": {
"code": "34970112332"
}
}
info: MatterServerAdmin.Program[0]
MatterServerClient.ReceiveFromWebSocket: 98 bytes received.
info: MatterServerAdmin.Program[0]
Received response:
{
"message_id": "3",
"error_code": 1,
"details": "Commission with code failed for node 1."
}

From the Matter Server logs:

2024-05-30 09:28:10.390 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning with code using Node ID 1 (attempt 1/3).
2024-05-30 09:28:13.312 (Dummy-2) INFO [root] Established secure session with Device
2024-05-30 09:28:14.890 (Dummy-2) CHIP_ERROR [chip.native.CTL] Failed in verifying 'Attestation Information' command received from the device: err 101. Look at AttestationVerificationResult enum to understand the errors
2024-05-30 09:28:14.892 (Dummy-2) CHIP_ERROR [chip.native.CTL] Error on commissioning step 'AttestationVerification': 'src/controller/CHIPDeviceController.cpp:1145: CHIP Error 0x000000AC: Internal error'
2024-05-30 09:28:17.019 (Dummy-2) WARNING [root] Failed to commission: src/controller/CHIPDeviceController.cpp:1145: CHIP Error 0x000000AC: Internal error

It would be nice if the details on the error could be sent to back to the client and not just a generic "Commission with code failed for node 1".

@marcelveldt
Copy link
Contributor

This is an area of our interest - we want to map more SDK errors to specific errors.
Not always we get back a specific error from the SDK unfortunately so this a painful process of slowly patching upstream etc. For our own application (Home Assistant) it would also be very helpful to tell the user more precisely what failed.

Its on the radar but so many others things as well ;-)

@marcelveldt marcelveldt added the new-feature New feature or request label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants