Exception: Mobiscroll::Connect::CalendarPermissionError
- Inherits:
-
AuthenticationError
- Object
- StandardError
- Error
- AuthenticationError
- Mobiscroll::Connect::CalendarPermissionError
- 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
-
#accounts ⇒ Object
readonly
Array of BlockedAccount structs that must reconnect.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = 'No connected account has calendar access', accounts: []) ⇒ CalendarPermissionError
constructor
A new instance of CalendarPermissionError.
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( = 'No connected account has calendar access', accounts: []) super() @code = 'CALENDAR_PERMISSION_REQUIRED' @accounts = accounts end |
Instance Attribute Details
#accounts ⇒ Object (readonly)
Array of BlockedAccount structs that must reconnect.
30 31 32 |
# File 'lib/mobiscroll/connect/errors.rb', line 30 def accounts @accounts end |