smart-sentry.js 568 B

12345678910111213141516171819202122
  1. /*
  2. * 错误上报sentry
  3. *
  4. * @Author: 1024创新实验室-主任:卓大
  5. * @Date: 2022-09-06 20:49:28
  6. * @Wechat: zhuda1024
  7. * @Email: lab1024@163.com
  8. * @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
  9. */
  10. export const smartSentry = {
  11. /**
  12. * sentry 主动上报
  13. */
  14. captureError: (error) => {
  15. if (error.config && error.data && error && error.headers && error.request && error.status) {
  16. return;
  17. }
  18. // Sentry.captureException(error);
  19. console.error(error);
  20. },
  21. };