I got to do it doing this:
const { ForbiddenError } = require("@strapi/utils").errors;
...
if (!authorized) {
throw new ForbiddenError(errorMessage);
}
You can check the errors available in @strapi/utils/lib/errors.js
I got to do it doing this:
const { ForbiddenError } = require("@strapi/utils").errors;
...
if (!authorized) {
throw new ForbiddenError(errorMessage);
}
You can check the errors available in @strapi/utils/lib/errors.js