Skip to content

fix: add ValueError guard for timeout in _build_opencode_plugin - #3973

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/events-timeout-int-guard
Open

fix: add ValueError guard for timeout in _build_opencode_plugin#3973
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/events-timeout-int-guard

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Problem

int(cfg.get('timeout', 60)) crashes with an unhandled ValueError when a user provides a non-numeric timeout value in event configuration. Two other call sites in the same file already handle this gracefully with ry/except (TypeError, ValueError).

Fix

Added the same ry/except guard, making the third call site consistent.

int(cfg.get('timeout', 60)) would crash on non-numeric user-provided
timeout values. Two other call sites in the same file already handle
this with try/except (TypeError, ValueError). This makes the third
call site consistent.
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.

1 participant