-
Notifications
You must be signed in to change notification settings - Fork 34
Improve error handling and add comprehensive client tests #2007
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8475b08
Enhance error handling and testing for Overkiz API
iMicknl c7a0876
Add local API specific tests for error handling in OverkizClient
iMicknl 1acd406
Remove test_error_handling.py script from branch
iMicknl ecd4f85
Remove unnecessary patch in test_local_no_registered_event_listener
iMicknl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| [ | ||
| { | ||
| "name": "core:StatusState", | ||
| "type": 3, | ||
| "value": "available" | ||
| }, | ||
| { | ||
| "name": "core:ClosureState", | ||
| "type": 1, | ||
| "value": 0 | ||
| }, | ||
| { | ||
| "name": "core:OpenClosedState", | ||
| "type": 3, | ||
| "value": "open" | ||
| } | ||
| ] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"id": "a70f6d96-0a19-0483-72d9-ac5f6bd7da26"} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"execId": "ee7a5676-c68f-43a3-956d-6f5efc745954"} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| [] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"triggerId": "abc12345-def6-7890-abcd-ef1234567890"} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| [ | ||
| { | ||
| "id": "699dd967-0a19-0481-7a62-99b990a2feb8", | ||
| "eventTime": 1767003511145, | ||
| "owner": "[email protected]", | ||
| "source": "modem", | ||
| "endTime": 1767003514000, | ||
| "effectiveStartTime": 1767003511500, | ||
| "duration": 2855, | ||
| "label": "close - RTS Roller Shutter", | ||
| "type": "ACTUATOR", | ||
| "state": "COMPLETED", | ||
| "failureType": "NO_FAILURE", | ||
| "commands": [ | ||
| { | ||
| "deviceURL": "rts://2025-8464-6867/16756006", | ||
| "command": "close", | ||
| "parameters": [], | ||
| "rank": 0, | ||
| "dynamic": false, | ||
| "state": "COMPLETED", | ||
| "failureType": "NO_FAILURE" | ||
| } | ||
| ], | ||
| "executionType": "Immediate execution", | ||
| "executionSubType": "MANUAL_CONTROL" | ||
| }, | ||
| { | ||
| "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012", | ||
| "eventTime": 1767002400000, | ||
| "owner": "[email protected]", | ||
| "source": "modem", | ||
| "duration": 0, | ||
| "label": "open - RTS Roller Shutter", | ||
| "type": "ACTUATOR", | ||
| "state": "FAILED", | ||
| "failureType": "CMDCANCELLED", | ||
| "commands": [ | ||
| { | ||
| "deviceURL": "rts://2025-8464-6867/16756006", | ||
| "command": "open", | ||
| "parameters": [], | ||
| "rank": 0, | ||
| "dynamic": false, | ||
| "state": "FAILED", | ||
| "failureType": "CMDCANCELLED" | ||
| } | ||
| ], | ||
| "executionType": "Immediate execution", | ||
| "executionSubType": "MANUAL_CONTROL" | ||
| } | ||
| ] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "creationTime": 1650000000000, | ||
| "lastUpdateTime": 1767003511145, | ||
| "label": "My House", | ||
| "type": 0, | ||
| "oid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", | ||
| "subPlaces": [ | ||
| { | ||
| "creationTime": 1650000100000, | ||
| "lastUpdateTime": 1767003511145, | ||
| "label": "Living Room", | ||
| "type": 1, | ||
| "oid": "11111111-2222-3333-4444-555555555555", | ||
| "subPlaces": [] | ||
| }, | ||
| { | ||
| "creationTime": 1650000200000, | ||
| "lastUpdateTime": null, | ||
| "label": "Bedroom", | ||
| "type": 1, | ||
| "oid": "66666666-7777-8888-9999-aaaaaaaaaaaa", | ||
| "subPlaces": [] | ||
| } | ||
| ] | ||
| } |
1 change: 1 addition & 0 deletions
1
tests/fixtures/exceptions/cloud/action-group-setup-not-found.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"errorCode":"INVALID_FIELD_VALUE","error":"Unable to determine action group setup (no setup for gateway #0000-0000-0000)"} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"errorCode":"NO_SUCH_ACTION_GROUP","error":"No such action group : 00000000-0000-0000-0000-000000000000"} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"errorCode":"NO_SUCH_RESSOURCE","error":"No such controllable : io:NonExistentDeviceControllable"} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"errorCode":"NO_SUCH_RESSOURCE","error":"No such core UI profile or form-factor : NonExistentProfile"} |
1 change: 1 addition & 0 deletions
1
tests/fixtures/exceptions/cloud/resource-access-denied-device-setup-mismatch.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"errorCode":"RESOURCE_ACCESS_DENIED","error":"Security exception : Device setup mismatch"} |
1 change: 1 addition & 0 deletions
1
tests/fixtures/exceptions/cloud/resource-access-denied-gateway-not-in-setup.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"errorCode":"RESOURCE_ACCESS_DENIED","error":"Security exception : Gateway #0000-0000-0000 does not belong to setup 15eaf55a-8af9-483b-ae4a-ffd4254fd762"} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "startTime": 1767003511145, | ||
| "owner": "[email protected]", | ||
| "actionGroup": { | ||
| "label": "Execution via Home Assistant", | ||
| "shortcut": false, | ||
| "notificationTypeMask": 0, | ||
| "notificationCondition": "NEVER", | ||
| "actions": [ | ||
| { | ||
| "deviceURL": "rts://1234-5678-1234/12345678", | ||
| "commands": [ | ||
| { | ||
| "type": 1, | ||
| "name": "close" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "description": "Execution : Execution via Home Assistant", | ||
| "id": "699dd967-0a19-0481-7a62-99b990a2feb8", | ||
| "state": "TRANSMITTED", | ||
| "executionType": "Immediate execution", | ||
| "executionSubType": "MANUAL_CONTROL" | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.