Exception: Expo::Push::TicketsWithErrors

Inherits:
Error
  • Object
show all
Defined in:
lib/push/client.rb

Overview

rubocop:disable Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

explain

Constructor Details

#initialize(errors:, data:) ⇒ TicketsWithErrors

Returns a new instance of TicketsWithErrors.



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/push/client.rb', line 50

def initialize(errors:, data:)
  self.data = data
  self.errors = errors

  if errors.length.zero?
    super 'Expected at least one error, but got none'
    return
  end

  puts errors

  super "Expo indicated one or more problems: #{errors.map { |error| error['message'] }}"
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



48
49
50
# File 'lib/push/client.rb', line 48

def data
  @data
end

#errorsObject

Returns the value of attribute errors.



48
49
50
# File 'lib/push/client.rb', line 48

def errors
  @errors
end