Skip to content

Improve error logging #25

Merged
maxd-nordic merged 1 commit into
nordicsemi:mainfrom
pascal-nordic:Improve-error-logging
Jan 12, 2026
Merged

Improve error logging #25
maxd-nordic merged 1 commit into
nordicsemi:mainfrom
pascal-nordic:Improve-error-logging

Conversation

@pascal-nordic
Copy link
Copy Markdown
Collaborator

The exception displayed in case there is a timeout when trying to identify what type of communication to have with the device is not user-friendly. This PR look to improve it.

@pascal-nordic pascal-nordic self-assigned this Jan 9, 2026
Comment thread src/nrfcredstore/command_interface.py Outdated
@pascal-nordic pascal-nordic force-pushed the Improve-error-logging branch from 26343f0 to 7c9f649 Compare January 9, 2026 13:08
application. The exception was not user friendly.

Signed-off-by: Pascal Hernandez <pascal.hernandez@nordicsemi.no>
@pascal-nordic pascal-nordic force-pushed the Improve-error-logging branch from 7c9f649 to 68ee004 Compare January 9, 2026 14:03
Comment thread src/nrfcredstore/comms.py
code = int(line.replace('+CME ERROR: ', ''))
# Parse error code if present, otherwise use -1 for unknown
try:
code_str = line.replace('+CME ERROR:', '').strip()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it would be interesting to have an example for a CME ERROR line that cannot be parsed. I guess that happens when logs are interleaved because of timing?

Copy link
Copy Markdown
Contributor

@maxd-nordic maxd-nordic left a comment

Choose a reason for hiding this comment

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

lgtm

@maxd-nordic maxd-nordic merged commit 22d2bdf into nordicsemi:main Jan 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants