Skip to content

Commit

Permalink
add new routing error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
garthvh committed Sep 19, 2024
1 parent 799f587 commit 39a4569
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Meshtastic/Enums/RoutingError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ enum RoutingError: Int, CaseIterable, Identifiable {
case notAuthorized = 33
case pkiFailed = 34
case pkiUnknownPubkey = 35
case adminBadSessionKey = 36
case adminPublicKeyUnauthorized = 37

var id: Int { self.rawValue }
var display: String {
Expand Down Expand Up @@ -57,6 +59,10 @@ enum RoutingError: Int, CaseIterable, Identifiable {
return "routing.pkifailed".localized
case .pkiUnknownPubkey:
return "routing.pkiunknownpubkey".localized
case .adminBadSessionKey:
return "routing.adminbadsessionkey".localized
case .adminPublicKeyUnauthorized:
return "routing.adminpublickeyunauthorized".localized
}
}
var color: Color {
Expand Down Expand Up @@ -98,6 +104,10 @@ enum RoutingError: Int, CaseIterable, Identifiable {
return true
case .pkiUnknownPubkey:
return true
case .adminBadSessionKey:
return true
case .adminPublicKeyUnauthorized:
return true
}
}
func protoEnumValue() -> Routing.Error {
Expand Down Expand Up @@ -132,6 +142,10 @@ enum RoutingError: Int, CaseIterable, Identifiable {
return Routing.Error.pkiFailed
case .pkiUnknownPubkey:
return Routing.Error.pkiUnknownPubkey
case .adminBadSessionKey:
return Routing.Error.adminBadSessionKey
case .adminPublicKeyUnauthorized:
return Routing.Error.adminPublicKeyUnauthorized
}
}
}

0 comments on commit 39a4569

Please sign in to comment.