Skip to content

fix error on window. replace error msg check by error code check#345

Merged
fleandrei merged 2 commits intomainfrom
fix_window_plugin_network_change
Jan 20, 2026
Merged

fix error on window. replace error msg check by error code check#345
fleandrei merged 2 commits intomainfrom
fix_window_plugin_network_change

Conversation

@fleandrei
Copy link
Contributor

No description provided.

Copy link
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 fixes error handling on Windows by replacing error message string checks with error code checks using a new sentinel error. The change improves cross-platform compatibility by avoiding platform-specific error message text matching.

Changes:

  • Introduced a new error package with a sentinel error ErrNetworkConfig for consistent error checking
  • Replaced error message string matching with errors.Is() checks for network configuration failures
  • Added a new method SetLastErrorIfEqual for conditional error state updates
  • Updated golangci-lint configuration version

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
server/pkg/error/error.go New error package defining ErrNetworkConfig sentinel error
server/int/api/config/config.go Updated error returns to use sentinel error instead of wrapped errors
plugin/int/server/config.go Replaced string-based error checking with errors.Is() check
plugin/int/station/networkManager.go Added error reset logic and fixed log parameter order
plugin/int/server/manager.go Added SetLastErrorIfEqual method for conditional error updates
plugin/home/src/Status.tsx Whitespace formatting change only
plugin/home/package-lock.json Dependency version updates
server/.golangci.yml Updated golangci-lint version to 2.3
plugin/manifest.json Version bump from 0.4.9 to 0.4.10
Files not reviewed (1)
  • plugin/home/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

plugin/int/station/networkManager.go:122

  • The documentation comment uses JavaDoc-style @param tags, which is not idiomatic for Go. Go documentation should use plain English without special tags.
/*
Retrieve current network information from station and update the deweb
server config file if the node url is not the same.
If the node name has changed, the node name will be updated in the cache (there is no node name in config).
@param restartServer if true, the server will be restarted with the new network url. Else, only the server config will be updated.
*/

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@0xB19 0xB19 self-requested a review January 20, 2026 13:46
@Soulthym Soulthym self-requested a review January 20, 2026 15:20
@fleandrei fleandrei merged commit f908516 into main Jan 20, 2026
15 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.

3 participants