Exception: EVSS::GiBillStatus::OutsideWorkingHours

Inherits:
Common::Exceptions::BaseError show all
Defined in:
lib/evss/gi_bill_status/outside_working_hours.rb

Overview

Custom error for when the user is attempting to access the service outside of working hours

Instance Method Summary collapse

Methods inherited from Common::Exceptions::BaseError

#log_to_sentry?, #message, #sentry_type, #status_code

Instance Method Details

#errorsArray[Common::Exceptions::SerializableError]

Returns An array containing the error.

Returns:



15
16
17
# File 'lib/evss/gi_bill_status/outside_working_hours.rb', line 15

def errors
  [Common::Exceptions::SerializableError.new(i18n_data)]
end

#i18n_keyString

Returns The i18n key.

Returns:

  • (String)

    The i18n key



30
31
32
# File 'lib/evss/gi_bill_status/outside_working_hours.rb', line 30

def i18n_key
  'evss.gi_bill_status.outside_working_hours'
end

#retry_afterTime

Returns The time to retry the request.

Returns:

  • (Time)

    The time to retry the request



22
23
24
25
# File 'lib/evss/gi_bill_status/outside_working_hours.rb', line 22

def retry_after
  # TODO: - this is correct format, but must write logic to properly calculate
  Time.now.httpdate.in_time_zone('Eastern Time (US & Canada)').to_s
end