Skip to content

check internet connection before hitting endpoint#28

Merged
jokodee merged 3 commits intosmbcloudXYZ:developmentfrom
jokodee:feature/offline-handling
Jul 3, 2025
Merged

check internet connection before hitting endpoint#28
jokodee merged 3 commits intosmbcloudXYZ:developmentfrom
jokodee:feature/offline-handling

Conversation

@jokodee
Copy link
Copy Markdown
Collaborator

@jokodee jokodee commented Jul 2, 2025

No description provided.

@setoelkahfi setoelkahfi requested a review from Copilot July 2, 2025 21:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an active internet connectivity check before issuing HTTP requests, surface a new network error when offline, and enforces connectivity at the CLI level.

  • Introduces check_internet_connection and integrates it into request()
  • Updates ErrorCode::NetworkError message to reference connectivity
  • Guards CLI commands with a pre-flight connectivity check

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
crates/smbcloud-networking/src/network.rs Adds check_internet_connection and plugs it into request()
crates/smbcloud-networking/src/lib.rs Re-exports the connectivity check function
crates/smbcloud-model/src/error_codes.rs Refines NetworkError attribute and default message
crates/cli/src/main.rs Applies connectivity check before running commands

paydii and others added 2 commits July 3, 2025 08:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@keypair34 keypair34 left a comment

Choose a reason for hiding this comment

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

lgtm

@jokodee jokodee merged commit ccf4eb4 into smbcloudXYZ:development Jul 3, 2025
@jokodee jokodee deleted the feature/offline-handling branch July 3, 2025 08:08
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.

4 participants