diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts index 6287b2071..beeb1eb15 100644 --- a/packages/backend/src/server/api/endpoints/following/invalidate.ts +++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts @@ -17,7 +17,7 @@ export const meta = { kind: 'write:following', - errors: ['FOLLOWER_IS_YOURSELF', 'NO_SUCH_USER', 'NOT_FOLLOWING'], + errors: ['FOLLOWER_IS_YOURSELF', 'NO_SUCH_USER', 'NOT_FOLLOWED'], res: { type: 'object', @@ -53,7 +53,7 @@ export default define(meta, paramDef, async (ps, user) => { followeeId: followee.id, }); - if (!exist) throw new ApiError('NOT_FOLLOWING'); + if (!exist) throw new ApiError('NOT_FOLLOWED'); await deleteFollowing(follower, followee); diff --git a/packages/backend/src/server/api/error.ts b/packages/backend/src/server/api/error.ts index 7636ab0ba..4af16383b 100644 --- a/packages/backend/src/server/api/error.ts +++ b/packages/backend/src/server/api/error.ts @@ -340,6 +340,10 @@ export const errors: Record message: 'You are not following that user.', httpStatusCode: 409, }, + NOT_FOLLOWED: { + message: 'You are not followed by that user.', + httpStatusCode: 409, + }, NOT_LIKED: { message: 'You have not liked that page.', httpStatusCode: 409,