Skip to content

Commit 81e49c4

Browse files
committed
Add permission error message to botfest
1 parent 2f690c4 commit 81e49c4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

botfest/src/main/kotlin/net/modfest/botfest/App.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ suspend fun main() {
6666
"fieldname" to Gson().fromJson(data.data, AlreadyExists::class.java).fieldName,
6767
"content" to Gson().fromJson(data.data, AlreadyExists::class.java).content
6868
)
69+
PlatformErrorResponse.ErrorType.PERMISSION_ERROR -> Translations.Apierror.permissions
70+
.translateNamed("err" to data.data.asString)
6971
PlatformErrorResponse.ErrorType.INTERNAL -> Translations.Apierror.internal
7072
.translateNamed("error" to data.data.asString)
7173
}

botfest/src/main/resources/translations/botfest/strings.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ modal.submit.event.response.success=Thank you for submitting an event! A team me
195195
apierror.event_no_exists=An event named {n} doesn't exists
196196
apierror.user_no_exists=A user named {n} doesn't exists
197197
apierror.already_used=A {fieldname} account for {content} already exists
198+
apierror.permissions=You do not have the permissions for this: {errMsg}
198199
apierror.internal=An unknown error occurred! Please notify a teammember.\n\
199200
```\n\
200201
{error}\n\

0 commit comments

Comments
 (0)