Files
Copilot 9858d160d5 Separate user input errors from internal errors for Sentry reporting (#11308)
* 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>
2026-01-30 05:55:28 -05:00

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,
});
}