seperate error for null followers

This commit is contained in:
ThatOneCalculator 2023-06-11 21:56:56 -07:00
parent 1d8f4a0a9c
commit 0345393011

View file

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