Skip to content

Fix: catch OSError/ConnectionError in Modbus service read path - #77

Merged
partach merged 1 commit into
mainfrom
claude/investigate-branch-delta-yrLn9
Jul 30, 2026
Merged

Fix: catch OSError/ConnectionError in Modbus service read path#77
partach merged 1 commit into
mainfrom
claude/investigate-branch-delta-yrLn9

Conversation

@partach

@partach partach commented Jul 30, 2026

Copy link
Copy Markdown
Owner

The async_read_entity() method (service-call path) only caught ModbusIOException but client.read() can also raise OSError and ConnectionError on network failures. This caused unhandled exceptions when using the read_register service with unreachable devices.

The bulk-read path (_auto_detect_type, _direct_read) already handled these correctly — only the service path was missed.

https://claude.ai/code/session_0141XkQRjcng4RKLD4Yv5FAr

The async_read_entity() method (service-call path) only caught
ModbusIOException but client.read() can also raise OSError and
ConnectionError on network failures. This caused unhandled exceptions
when using the read_register service with unreachable devices.

The bulk-read path (_auto_detect_type, _direct_read) already handled
these correctly — only the service path was missed.

https://claude.ai/code/session_0141XkQRjcng4RKLD4Yv5FAr
@partach
partach merged commit 153167e into main Jul 30, 2026
3 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.

2 participants