seperate error for null followers

This commit is contained in:
ThatOneCalculator 2023-06-11 21:56:56 -07:00
parent fc7c752337
commit c3b332acf9
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 7 additions and 1 deletions

View File

@ -37,6 +37,12 @@ export const meta = {
code: "FORBIDDEN", code: "FORBIDDEN",
id: "3c6a84db-d619-26af-ca14-06232a21df8a", id: "3c6a84db-d619-26af-ca14-06232a21df8a",
}, },
nullFollowers: {
message: "No followers found.",
code: "NULL_FOLLOWERS",
id: "174a6507-a6c2-4925-8e5d-92fd08aedc9e",
}
}, },
} as const; } as const;
@ -97,7 +103,7 @@ export default define(meta, paramDef, async (ps, me) => {
followerId: me.id, followerId: me.id,
}); });
if (following == null) { if (following == null) {
throw new ApiError(meta.errors.forbidden); throw new ApiError(meta.errors.nullFollowers);
} }
} }
} }