Class: Tasker::Events::Subscribers::BaseSubscriber::ErrorCategorizer

Inherits:
Object
  • Object
show all
Defined in:
lib/tasker/events/subscribers/base_subscriber.rb

Overview

Service class to categorize error types for metrics Reduces complexity by organizing error classification logic

Defined Under Namespace

Classes: ErrorTypeClassifier

Class Method Summary collapse

Class Method Details

.categorize(error_class) ⇒ String

Categorize error based on class name

Parameters:

  • error_class (String)

    The exception class name

Returns:

  • (String)

    Categorized error type



481
482
483
484
485
486
487
# File 'lib/tasker/events/subscribers/base_subscriber.rb', line 481

def categorize(error_class)
  return 'unknown' if error_class.blank?

  error_string = error_class.to_s

  classify_error_type(error_string)
end