Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW FEAT.] Add URL validation process to avoid Google Apps Script's Exception: Invalid argument: url Error #324

Open
ttsukagoshi opened this issue Jul 8, 2023 Discussed in #323 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ttsukagoshi
Copy link
Owner

Discussed in #323

Background

There are several ways in which you can specify a spreadsheet by its URL:

  1. The basic format: https://docs.google.com/spreadsheets/d/<sheet-id>/edit#gid=0
  2. The basic format without specifying the worksheet ID gid: https://docs.google.com/spreadsheets/d/<sheet-id>/edit
  3. Pattern 2 without edit: https://docs.google.com/spreadsheets/d/<sheet-id>/
  4. Pattern 3 without the trailing /: https://docs.google.com/spreadsheets/d/<sheet-id>

Patterns 1 - 4 all work fine if you are simply entering the URL in your browser, but it is not so in Google Apps Script (GAS), which is the underlying architecture behind Group Merge. In GAS, Patterns 1 - 3 are acceptable, while Pattern 4 returns the error in the title.

Current workaround

Following the How-to-Use steps in the add-on's webpage would be the easiest way to avoid it; you can let the add-on enter the spreadsheet URL automatically at step 4.

Adding URL Validation

Since the add-on allows users to enter the spreadsheet URL freely, it would be better to have a validation step to check the URL format and add /edit to the end of the URL when necessary to avoid the error.
Screenshot of the sidebar of Group Merge, with an arrow pointing to the part where the user can enter the spreadsheet URL.

@ttsukagoshi ttsukagoshi added the enhancement New feature or request label Jul 8, 2023
@ttsukagoshi ttsukagoshi self-assigned this Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant