Skip to content

[BUG] nmrs: inconsistent error handling for "Not Found" cases #186

@cachebag

Description

@cachebag
  • disconnect_vpn() returns Ok(()) if VPN doesn't exist (idempotent)
  • forget() returns Err(NoSavedConnection) if connection doesn't exist
  • forget_vpn() returns Err(NoSavedConnection) if VPN doesn't exist

This is pretty inconsistent behavior; some operations are idempotent, others aren't.

We can make all "delete/forget/disconnect" operations idempotent (return Ok() if already in desired state)

OR we make them all return errors consistently. Best to document this too.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfeatureNew feature or requestgood first issueGood for newcomersnmrsChanges to nmrsrefactorChange or improve code

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions