summary refs log tree commit diff
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-04-24 09:48:45 +0300
committerGitHub <noreply@github.com>2022-04-24 09:48:45 +0300
commit7d665a83fa76c6acd3a97dad0ad0e314d395481a (patch)
tree59798cd2464e08f76a4e0a36a1d8dc00ac2bce72
parentBackfilling privilege does not imply right to post messages (diff)
downloadserver-7d665a83fa76c6acd3a97dad0ad0e314d395481a.tar.xz
API response codes for backfill errors
-rw-r--r--util/src/util/Constants.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/src/util/Constants.ts b/util/src/util/Constants.ts
index 8d61b9b4..9ceebf30 100644
--- a/util/src/util/Constants.ts
+++ b/util/src/util/Constants.ts
@@ -742,6 +742,8 @@ export const FosscordApiErrors = {
 	DELETE_MESSAGE_DISABLED: new ApiError("You are not allowed to delete your own messages", 25061),
 	FEATURE_PERMANENTLY_DISABLED: new ApiError("This feature has been disabled server-side", 45006),
 	MISSING_RIGHTS: new ApiError("You lack rights to perform that action ({})", 50013, undefined, [""]),
+	CANNOT_REPLACE_BY_BACKFILL: new APIError("Cannot backfill to message ID that already exists", 55002),
+	CANNOT_BACKFILL_TO_THE_FUTURE: new APIError("You cannot backfill messages in the future", 55003),
 	CANNOT_GRANT_PERMISSIONS_EXCEEDING_RIGHTS: new ApiError("You cannot grant permissions exceeding your own rights", 50050),
 	ROUTES_LOOPING: new ApiError("Loops in the route definition ({})", 50060, undefined, [""]),
 	CANNOT_REMOVE_ROUTE: new ApiError("Cannot remove message route while it is in effect and being used", 50061),