package daemon import ( "isle/daemon/daecommon" "isle/daemon/jsonrpc2" ) const ( errCodeNoNetwork = daecommon.ErrorCodeRangeDaemon + iota errCodeAlreadyJoined errCodeNoMatchingNetworks errCodeMultipleMatchingNetworks errCodeUserManagedNetworkConfig ) var ( // ErrNoNetwork is returned when the daemon has never been configured with a // network. ErrNoNetwork = jsonrpc2.NewError(errCodeNoNetwork, "No network configured") // ErrAlreadyJoined is returned when the daemon is instructed to create or // join a new network, but it is already joined to that network. ErrAlreadyJoined = jsonrpc2.NewError(errCodeAlreadyJoined, "Already joined to a network") // ErrNoMatchingNetworks is returned if the search string didn't match any // networks. ErrNoMatchingNetworks = jsonrpc2.NewError( errCodeNoMatchingNetworks, "No networks matched the search string", ) // ErrMultipleMatchingNetworks is returned if the search string matched // multiple networks. ErrMultipleMatchingNetworks = jsonrpc2.NewError( errCodeMultipleMatchingNetworks, "Multiple networks matched the search string", ) // ErrUserManagedNetworkConfig is returned when attempting to modify a // network config which is managed by the user. ErrUserManagedNetworkConfig = jsonrpc2.NewError( errCodeUserManagedNetworkConfig, "Network configuration is managed by the user", ) )