Embedded Scheduler Error States

The Embedded Scheduler can emit a cronofyschedulererror event for a number of reasons, and you may choose to subscribe to these. However, we handle all of the errors encountered during the development of this feature, rendering a helpful message to the user.

We hope that this gives you the confidence that:

  • your engineers can more quickly resolve issues that arise during integration (relating to invalid token generation for example)
  • your customers will receive helpful messaging, with guidance for how to resolve the issue in most cases

If you attempt to use the Embedded Scheduler in your browser’s incognito mode/private window, you can see for yourself how the error messaging appears.

The cronofyschedulererror event that gets published is a CustomEvent, that has a detail property with the following schema:

{
  code: 'token_expired'
}

This allows your application to respond to errors on a case by case basis.

The full list of errors we currently return can be found here.

Below are some examples of the type of errors we emit, and the accompanying messaging:

Incognito Mode - Private Browsing #

code: 'missing_session_claim_secret' | 'missing_session_claim_token'

We don’t support the use of the Scheduler Embed anywhere that restricts cookie and local storage access. When a browser is in incognito mode or private browsing, after the user logs in, the authorization will ultimately fail.

You will see the following in this case:

No Calendars Available #

code: 'no_calendars'

The user still needs to connect their calendar with Cronofy. The link will open the Cronofy app in a new tab, and ensure the user has connected a calendar.

The messaging in this case looks like this:

Scheduling Request Not Found #

code: `scheduling_request_not_found`

For the cancel button, we handle the error where the SCHEDULING_REQUEST_ID either does not exist, or the user does not have permission to access it.

See example:

Token Expired #

code: 'token_expired'

When the token is expired we show the following message:

Error Codes #

We currently return the following error codes:

  • token_iss_missing
  • token_jti_missing
  • token_aud_invalid
  • token_iss_invalid
  • token_iat_invalid
  • token_valid_period_too_long
  • token_expired
  • token_invalid
  • state_token_failure
  • state_token_missing
  • state_token_invalid
  • unexpected_account_id_entity
  • session_claim_verification_failure
  • missing_session_claim_secret
  • missing_session_claim_token
  • no_calendars
  • setup_incomplete
  • scheduling_request_not_found
  • scheduling_request_cancel_failed