Exception: Mobiscroll::Connect::CalendarPermissionError

Inherits:
AuthenticationError show all
Defined in:
lib/mobiscroll/connect/errors.rb

Overview

Raised when no connected account has the calendar access the request needs.

The user completed sign-in but did not grant the calendar permission — Google's consent screen presents it as a separate checkbox. This cannot be repaired server-side, because providers only issue permissions at consent time: the accounts in accounts have to run the connect flow again and allow access.

Subclasses AuthenticationError, so existing rescue clauses keep working.

Instance Attribute Summary collapse

Attributes inherited from Error

#code

Instance Method Summary collapse

Constructor Details

#initialize(message = 'No connected account has calendar access', accounts: []) ⇒ CalendarPermissionError

Returns a new instance of CalendarPermissionError.



32
33
34
35
36
# File 'lib/mobiscroll/connect/errors.rb', line 32

def initialize(message = 'No connected account has calendar access', accounts: [])
  super(message)
  @code = 'CALENDAR_PERMISSION_REQUIRED'
  @accounts = accounts
end

Instance Attribute Details

#accountsObject (readonly)

Array of BlockedAccount structs that must reconnect.



30
31
32
# File 'lib/mobiscroll/connect/errors.rb', line 30

def accounts
  @accounts
end