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

[Bug]: Sync Map retrieval errors on URLs as keys #1077

Open
Blackglade opened this issue Mar 18, 2025 · 0 comments
Open

[Bug]: Sync Map retrieval errors on URLs as keys #1077

Blackglade opened this issue Mar 18, 2025 · 0 comments

Comments

@Blackglade
Copy link

Here is the code I am using to store/retrieve data from my sync maps.

await client.sync.v1
    .services(SYNC_SERVICE_SID)
    .syncMaps(ENVIRONMENT_MAP_SID)
    .syncMapItems.create({
      key: "https://test.example.com",
      data: {
        lastUpdated: new Date().toISOString(),
      },
    });

// Retrieval

await client.sync.v1
    .services(SYNC_SERVICE_SID)
    .syncMaps(ENVIRONMENT_MAP_SID)
    .syncMapItems("https://test.example.com")
    .fetch();

Despite me double checking the key does indeed exist on the sync map, I can't access it via the API. I get the following error:

/Users/harshbaid/Desktop/twilio/node_modules/twilio/lib/rest/sync/v1/service/syncMap/syncMapItem.js:35
            throw new Error("Parameter 'key' is not valid.");
                  ^

Error: Parameter 'key' is not valid.
    at new SyncMapItemContextImpl (/Users/harshbaid/Desktop/twilio/node_modules/twilio/lib/rest/sync/v1/service/syncMap/syncMapItem.js:35:19)
@Blackglade Blackglade changed the title [Bug]: Sync Map errors out on URLs as keys [Bug]: Sync Map retrieval errors on URLs as keys Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant