;
          return;
        }

        // if there is an error message, render it
        if (ERROR_MESSAGE) {
          // format of error message is expected to use colon as separator character, e.g., "An error occurred. : Failed to parse original URL."
          const [title, description] = ERROR_MESSAGE.split(":");
          renderError(title.trim(), description.trim());
          return;
        }

        // check if the enroll secret is valid.
        if (!getEnrollmentSecret()) {
          renderErr