Skip to content

Node.js based forum software built for the modern web

fix: rename language key for incorrect parameter type error

Julian Lamaeb43b9bb1c0
diff --git a/public/language/en-GB/error.json b/public/language/en-GB/error.json
index eccd5d43d1..bf004cf7a3 100644
--- a/public/language/en-GB/error.json
+++ b/public/language/en-GB/error.json
@@ -1,7 +1,7 @@
{
"invalid-data": "Invalid Data",
"invalid-json": "Invalid JSON",
- "array-expected": "A value of type Array was expected for property `%1`, but %2 was received instead",
+ "wrong-parameter-type": "A value of type %3 was expected for property `%1`, but %2 was received instead",
"required-parameters-missing": "Required parameters were missing from this API call: %1",
"not-logged-in": "You don't seem to be logged in.",
diff --git a/src/api/chats.js b/src/api/chats.js
index 0ab920aa42..67d2eabe5a 100644
--- a/src/api/chats.js
+++ b/src/api/chats.js
@@ -29,7 +29,7 @@ chatsAPI.create = async function (caller, data) {
}
if (!data.uids || !Array.isArray(data.uids)) {
- throw new Error(`[[error:array-expected, uids, ${typeof data.uids}]]`);
+ throw new Error(`[[error:wrong-parameter-type, uids, ${typeof data.uids}, Array]]`);
}
await Promise.all(data.uids.map(async uid => messaging.canMessageUser(caller.uid, uid)));