S8BizException.cs 833 B

123456789101112131415161718
  1. namespace Admin.NET.Plugin.AiDOP.Service.S8;
  2. /// <summary>S8 业务规则异常,由 Controller 捕获后返回 400。</summary>
  3. public class S8BizException : Exception
  4. {
  5. public S8BizException(string message) : base(message) { }
  6. }
  7. /// <summary>
  8. /// S8-TENANT-FACTORY-P0-CLOSURE-1:目标资源在当前可信作用域内不存在(不存在,或属于其它租户 / 工厂)。
  9. /// 由 Controller 捕获后统一返回 404——对越权 Id 与不存在 Id 给出同一响应,
  10. /// 不泄露「他租户存在该资源」。继承 <see cref="S8BizException"/>,
  11. /// 使既有只捕获 S8BizException 的调用方仍能安全降级为 400,而不是 500。
  12. /// </summary>
  13. public sealed class S8NotFoundException : S8BizException
  14. {
  15. public S8NotFoundException(string message = "记录不存在") : base(message) { }
  16. }