mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
9858d160d5
* Initial plan * Add explicit error categorization with isSentryReported property Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * Rename isSentryReported to isReportable Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> * Update Discord plugin errors to use isReportable Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>
20 lines
468 B
TypeScript
20 lines
468 B
TypeScript
import httpErrors from "http-errors";
|
|
|
|
export function DiscordGuildError(
|
|
message = "User is not a member of the required Discord server"
|
|
) {
|
|
return httpErrors(400, message, {
|
|
id: "discord_guild_error",
|
|
isReportable: false,
|
|
});
|
|
}
|
|
|
|
export function DiscordGuildRoleError(
|
|
message = "User does not have the required role from the Discord server"
|
|
) {
|
|
return httpErrors(400, message, {
|
|
id: "discord_guild_role_error",
|
|
isReportable: false,
|
|
});
|
|
}
|