Skip to content

feat: keep track of network failures - #484

Draft
ctrlaltf24 wants to merge 1 commit into
mainfrom
feat/network-offline-detection
Draft

feat: keep track of network failures#484
ctrlaltf24 wants to merge 1 commit into
mainfrom
feat/network-offline-detection

Conversation

@ctrlaltf24

@ctrlaltf24 ctrlaltf24 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

A draft demonstrating how decorators can be used to facilitate not repeating the try except catches across the repo

@offline_aware guards NetworkRequests methods: a ConnectionError marks
the instance offline for 2 minutes and raises NetworkOffline. A
decorator wraps each method so the offline check and try/except frame
the body once, instead of repeating the same rule inside every method.

Ai generated untested

@offline_aware guards NetworkRequests methods: a ConnectionError marks
the instance offline for 2 minutes and raises NetworkOffline. A
decorator wraps each method so the offline check and try/except frame
the body once, instead of repeating the same rule inside every method.

Co-authored-by: MiniMax-M3 <noreply@MiniMax-M3.ai>
@ctrlaltf24
ctrlaltf24 marked this pull request as draft July 20, 2026 22:53
@ctrlaltf24

Copy link
Copy Markdown
Contributor Author

PR made for demonstration purposes more than an intent to merge.

FYI @thw26

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