Skip to content

Classify invalid paths as unknown paths - #505

Merged
iMicknl merged 2 commits into
iMicknl:mainfrom
fraviktor:fix/xmo_invalid_path_error
Jul 19, 2026
Merged

Classify invalid paths as unknown paths#505
iMicknl merged 2 commits into
iMicknl:mainfrom
fraviktor:fix/xmo_invalid_path_error

Conversation

@fraviktor

Copy link
Copy Markdown
Contributor

Summary

  • Add XMO_INVALID_PATH_ERR as a recognized API error.
  • Map both XMO_INVALID_PATH_ERR and XMO_UNKNOWN_PATH_ERR to UnknownPathException.
  • Preserve the router-provided numeric error code and description in the exception arguments.
  • Add a sanitized request/action error fixture and test the mapping through the mocked HTTP response path.

Background

Some Sagemcom firmware returns XMO_INVALID_PATH_ERR instead of
XMO_UNKNOWN_PATH_ERR when an XPath is unsupported.

For example, this was observed on a FAST3896 Magyar gateway running
FAST3896_MAGYAR_sw23.83.19.23e:

code: 16777242
description: XMO_INVALID_PATH_ERR

@fraviktor
fraviktor requested a review from iMicknl as a code owner July 19, 2026 11:36
@fraviktor

Copy link
Copy Markdown
Contributor Author

Hi @iMicknl !
Unfortunately the pr-labeler can't work with a PR came from a fork, so you can either do the labeler manually and ignore this error or we could figure out how to update it using the TimonVS's gh action.
Maybe if you could push this fix to the "main", changing the
on: pull_request: types: [opened]
to
on: pull_request_target: types: [opened, reopened, synchronize]
then it would solve this. Sadly it won't solve the warnings about Node 20 deprecation, but I don't mind if you can live with it.

@iMicknl iMicknl mentioned this pull request Jul 19, 2026
iMicknl added a commit that referenced this pull request Jul 19, 2026
## Summary

- replace TimonVS/pr-labeler-action with Release Drafter's Node 24
autolabeler
- use pull_request_target so labeling works for fork PRs
- preserve the existing branch-to-label conventions exactly
- pin the action to the v7.6.0 commit SHA

This addresses the labeler failure discussed in #505 without checking
out or executing contributor-controlled code.

## Verification

- uv run prek run --all-files
- uv run pytest (4 passed)
- git diff --check

@iMicknl iMicknl left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks!

@iMicknl
iMicknl merged commit cbbebda into iMicknl:main Jul 19, 2026
4 checks passed
@iMicknl iMicknl added the enhancement New feature or request label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants