Skip to content

Commit 1e9839e

Browse files
committed
feat: add rate limit exceeded error message
This commit introduces a new error message for when the routing rate limit is exceeded. The following changes were made: - Added a new string resource for the rate limit exceeded error message. - Updated the `Message.kt` file to include the new error message in the routing error handling. Signed-off-by: James Rich <[email protected]>
1 parent 87330da commit 1e9839e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

app/src/main/java/com/geeksville/mesh/model/Message.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ fun getStringResFrom(routingError: Int): Int = when (routingError) {
4242
Routing.Error.PKI_UNKNOWN_PUBKEY_VALUE -> R.string.routing_error_pki_unknown_pubkey
4343
Routing.Error.ADMIN_BAD_SESSION_KEY_VALUE -> R.string.routing_error_admin_bad_session_key
4444
Routing.Error.ADMIN_PUBLIC_KEY_UNAUTHORIZED_VALUE -> R.string.routing_error_admin_public_key_unauthorized
45+
Routing.Error.RATE_LIMIT_EXCEEDED -> R.string.routing_error_rate_limit_exceeded
4546
else -> R.string.unrecognized
4647
}
4748

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,4 +780,5 @@
780780
<string name="security_icon_help_show_less">Show Current Status</string>
781781
<string name="security_icon_help_dismiss">Dismiss</string>
782782

783+
<string name="routing_error_rate_limit_exceeded">Rate Limit Exceeded. Please try again later.</string>
783784
</resources>

0 commit comments

Comments
 (0)