@@ -27,83 +27,88 @@ enum RoutingError: Int, CaseIterable, Identifiable {
2727 case adminBadSessionKey = 36
2828 case adminPublicKeyUnauthorized = 37
2929 case rateLimitExceeded = 38
30+ case pkiSendFailPublicKey = 39
3031
3132 var id : Int { self . rawValue }
3233 var display : String {
3334 switch self {
3435
3536 case . none:
36- return " Acknowledged " . localized
37+ return " Delivered to recipient " . localized
3738 case . noRoute:
38- return " No Route " . localized
39+ return " Failed to deliver to mesh " . localized
3940 case . gotNak:
40- return " Received a negative acknowledgment " . localized
41+ return " Failed to deliver to mesh " . localized
4142 case . timeout:
42- return " Timeout " . localized
43+ return " Failed to deliver to mesh " . localized
4344 case . noInterface:
44- return " No Interface " . localized
45+ return " No radio interface " . localized
4546 case . maxRetransmit:
46- return " Max Retransmission Reached " . localized
47+ return " Failed to deliver to mesh " . localized
4748 case . noChannel:
48- return " No Channel" . localized
49+ return " Channel/key mismatch " . localized
4950 case . tooLarge:
50- return " The packet is too large" . localized
51+ return " Message is too large to send " . localized
5152 case . noResponse:
52- return " No Response " . localized
53+ return " No app response " . localized
5354 case . dutyCycleLimit:
54- return " Regional Duty Cycle Limit Reached " . localized
55+ return " Duty cycle limit " . localized
5556 case . badRequest:
56- return " Bad Request " . localized
57+ return " Invalid request " . localized
5758 case . notAuthorized:
58- return " Not Authorized " . localized
59+ return " Not authorized " . localized
5960 case . pkiFailed:
60- return " Encrypted Send Failed " . localized
61+ return " Could not send encrypted message " . localized
6162 case . pkiUnknownPubkey:
62- return " Unknown public key" . localized
63+ return " Recipient needs your key" . localized
6364 case . adminBadSessionKey:
64- return " Bad admin session key " . localized
65+ return " Admin session expired " . localized
6566 case . adminPublicKeyUnauthorized:
66- return " Unauthorized admin public key " . localized
67+ return " Admin key not authorized " . localized
6768 case . rateLimitExceeded:
68- return " Rate Limit Exceeded " . localized
69+ return " Rate limited " . localized
70+ case . pkiSendFailPublicKey:
71+ return " Recipient key unavailable " . localized
6972 }
7073 }
7174 var description : String {
7275 switch self {
7376 case . none:
74- return " Message was successfully delivered to the recipient ." . localized
77+ return " The recipient confirmed this message ." . localized
7578 case . noRoute:
76- return " No route to the destination node was found in the mesh. " . localized
79+ return " No route to the destination node was found in the mesh. Try again when more nodes are reachable. " . localized
7780 case . gotNak:
78- return " A node in the path explicitly rejected the packet . " . localized
81+ return " A node rejected this message. Try again when the route changes . " . localized
7982 case . timeout:
80- return " No acknowledgment was received within the expected time window . " . localized
83+ return " No acknowledgment was received in time. Try again when you have better signal or more mesh coverage . " . localized
8184 case . noInterface:
82- return " The radio interface needed to send the packet is unavailable . " . localized
85+ return " The sender has no usable radio interface for this message . " . localized
8386 case . maxRetransmit:
84- return " The packet was retransmitted the maximum number of times without acknowledgment ." . localized
87+ return " No node confirmed this message. Try again when you have better signal or more mesh coverage ." . localized
8588 case . noChannel:
86- return " The channel required for this message is not configured on the device . " . localized
89+ return " The sender or recipient could not use a matching channel/key for this message . " . localized
8790 case . tooLarge:
88- return " The message exceeds the maximum packet size and cannot be sent ." . localized
91+ return " Shorten the message and send it again ." . localized
8992 case . noResponse:
90- return " The destination node did not respond to the request . " . localized
93+ return " The destination received the request, but no app or module responded. Try again when the recipient is reachable . " . localized
9194 case . dutyCycleLimit:
92- return " The regional duty cycle limit has been reached; transmissions are temporarily paused ." . localized
95+ return " Local airtime limits are temporarily blocking sends. Wait before trying again ." . localized
9396 case . badRequest:
94- return " The request was malformed or contained invalid parameters . " . localized
97+ return " The destination rejected this request as invalid. " . localized
9598 case . notAuthorized:
96- return " The requesting node is not authorized to perform this action . " . localized
99+ return " The destination refused this request because it is not authorized . " . localized
97100 case . pkiFailed:
98- return " Public key encryption failed; the message could not be encrypted for the recipient ." . localized
101+ return " The encrypted send path could not be used. Wait for node info or keys to sync, then try again ." . localized
99102 case . pkiUnknownPubkey:
100- return " The recipient's public key is not known; direct message encryption is not possible . " . localized
103+ return " The recipient does not know your public key yet. Your node may share its info automatically; try again after it syncs . " . localized
101104 case . adminBadSessionKey:
102- return " The admin session key is invalid or has expired . " . localized
105+ return " The admin session key is missing, expired, or invalid. Request a new session before trying again . " . localized
103106 case . adminPublicKeyUnauthorized:
104- return " The admin public key is not in the authorized list on the remote node . " . localized
107+ return " The remote node does not authorize your admin key . " . localized
105108 case . rateLimitExceeded:
106- return " Too many requests were sent in a short period; wait before retrying. " . localized
109+ return " Messages are being sent too quickly. Wait before trying again. " . localized
110+ case . pkiSendFailPublicKey:
111+ return " Your node does not have the recipient's public key yet. Wait for node info to sync, then try again. " . localized
107112 }
108113 }
109114 var color : Color {
@@ -130,27 +135,29 @@ enum RoutingError: Int, CaseIterable, Identifiable {
130135 case . maxRetransmit:
131136 return true
132137 case . noChannel:
133- return true
138+ return false
134139 case . tooLarge:
135140 return false
136141 case . noResponse:
137142 return true
138143 case . dutyCycleLimit:
139144 return true
140145 case . badRequest:
141- return true
146+ return false
142147 case . notAuthorized:
143- return true
148+ return false
144149 case . pkiFailed:
145150 return true
146151 case . pkiUnknownPubkey:
147152 return true
148153 case . adminBadSessionKey:
149154 return true
150155 case . adminPublicKeyUnauthorized:
151- return true
156+ return false
152157 case . rateLimitExceeded:
153158 return true
159+ case . pkiSendFailPublicKey:
160+ return true
154161 }
155162 }
156163 func protoEnumValue( ) -> Routing . Error {
@@ -191,6 +198,8 @@ enum RoutingError: Int, CaseIterable, Identifiable {
191198 return Routing . Error. adminPublicKeyUnauthorized
192199 case . rateLimitExceeded:
193200 return Routing . Error. rateLimitExceeded
201+ case . pkiSendFailPublicKey:
202+ return Routing . Error. pkiSendFailPublicKey
194203 }
195204 }
196205}
0 commit comments