mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-22 13:29:08 +02:00
[client] Name only the refusals, not every FailedPrecondition
The classifier gained a blanket FailedPrecondition -> change_refused fallback so a refusal would stop reading as "Operation failed". It reaches too far: the daemon returns that code for two dozen states that are not settings refusals — "not logged in", "client is not running", "another capture is already running", "session can no longer be extended, log in again to reconnect" — and errorClassifier is shared with the session and connection services, not just the settings save. So the user was told the service had refused their change while what they actually had to do was log in again. The two refusals the daemon composes stay named by their message; everything else goes back to the generic message, which says nothing rather than something wrong. Reported by cubic on the PR.
This commit is contained in:
@@ -1803,10 +1803,6 @@
|
||||
"message": "This setting is managed by your organization and cannot be changed.",
|
||||
"description": "Error: the setting is enforced by an MDM policy. 'MDM' = mobile device management, the organization's device-management system."
|
||||
},
|
||||
"error.change_refused": {
|
||||
"message": "The NetBird service refused this change.",
|
||||
"description": "Error: the daemon answered the request and declined it. Generic fallback for a refusal with no more specific cause."
|
||||
},
|
||||
"error.unknown": {
|
||||
"message": "Operation failed.",
|
||||
"description": "Generic fallback error message used when no specific error applies."
|
||||
|
||||
Reference in New Issue
Block a user