processingErrorTitle.tsx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {t} from 'sentry/locale';
  2. import {ProcessingErrorType} from 'sentry/views/monitors/types';
  3. export function ProcessingErrorTitle({type}: {type: ProcessingErrorType}) {
  4. switch (type) {
  5. case ProcessingErrorType.CHECKIN_ENVIRONMENT_MISMATCH:
  6. return t('Environment mismatch');
  7. case ProcessingErrorType.CHECKIN_FINISHED:
  8. return t('Check-in already completed');
  9. case ProcessingErrorType.CHECKIN_GUID_PROJECT_MISMATCH:
  10. return t('DSN project mismatch');
  11. case ProcessingErrorType.CHECKIN_INVALID_DURATION:
  12. return t('Invalid duration');
  13. case ProcessingErrorType.CHECKIN_INVALID_GUID:
  14. return t('Invalid GUID');
  15. case ProcessingErrorType.CHECKIN_VALIDATION_FAILED:
  16. return t('Invalid check-in payload');
  17. case ProcessingErrorType.MONITOR_DISABLED:
  18. return t('Monitor disabled');
  19. case ProcessingErrorType.MONITOR_DISABLED_NO_QUOTA:
  20. return t('Insufficient quota to upsert');
  21. case ProcessingErrorType.MONITOR_INVALID_CONFIG:
  22. return t('Invalid monitor payload');
  23. case ProcessingErrorType.MONITOR_INVALID_ENVIRONMENT:
  24. return t('Invalid environment');
  25. case ProcessingErrorType.MONITOR_LIMIT_EXCEEDED:
  26. return t('Maximum monitor limit exceeded');
  27. case ProcessingErrorType.MONITOR_NOT_FOUND:
  28. return t('Monitor not found');
  29. case ProcessingErrorType.MONITOR_OVER_QUOTA:
  30. return t('Monitor disabled');
  31. case ProcessingErrorType.MONITOR_ENVIRONMENT_LIMIT_EXCEEDED:
  32. return t('Environment limit exceeded');
  33. case ProcessingErrorType.MONITOR_ENVIRONMENT_RATELIMITED:
  34. return t('Rate limited');
  35. case ProcessingErrorType.ORGANIZATION_KILLSWITCH_ENABLED:
  36. return t('Disabled check-in ingestion');
  37. default:
  38. return t('Unknown processing error');
  39. }
  40. }