Skip to content

fix(core): add error handling to prevent crashes on read-only filesystem#6036

Open
levanel wants to merge 1 commit intoaden-hive:mainfrom
levanel:fix/readonly-dump-failed-request
Open

fix(core): add error handling to prevent crashes on read-only filesystem#6036
levanel wants to merge 1 commit intoaden-hive:mainfrom
levanel:fix/readonly-dump-failed-request

Conversation

@levanel
Copy link

@levanel levanel commented Mar 8, 2026

Description

Wrapped the _dump_failed_request file I/O in a try/except block to catch OSError/PermissionError and return a fallback string, preventing fatal crashes on read only filesystems.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #5965

Changes Made

Wrap the directory creation and file I/O inside{_dump_failed_request} in a try/except block. If the write fails, use 'logger.warning()' to log the error to the console and return a fallback string (like "log_write_failed")

Testing

Describe the tests you ran to verify your changes:

  • Unit tests pass (cd core && pytest tests/)
  • Lint passes (cd core && ruff check .)
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

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.

[Bug]: _dump_failed_request crashes agent on read only filesystems (Missing Error handling)

1 participant