mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
throw different error if following is null
This commit is contained in:
parent
2b033a813f
commit
f6d1fa8519
@ -37,6 +37,11 @@ export const meta = {
|
|||||||
code: "FORBIDDEN",
|
code: "FORBIDDEN",
|
||||||
id: "f6cdb0df-c19f-ec5c-7dbb-0ba84a1f92ba",
|
id: "f6cdb0df-c19f-ec5c-7dbb-0ba84a1f92ba",
|
||||||
},
|
},
|
||||||
|
cannot_find: {
|
||||||
|
message: "Cannot find the following.",
|
||||||
|
code: "CANNOT_FIND",
|
||||||
|
id: "7a55f0d7-8e06-4a7e-9c77-ee7d59b25a82",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
@ -97,7 +102,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.cannot_find);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user