Skip to content

[BUG] return type of pd.makeProxyRequest is not always string #16355

@MartinMalinda

Description

@MartinMalinda

IDE suggests that schemaResponse is a string, but in some cases it can be an object.

// Build the Airtable endpoint URL to fetch schema of the selected table
    const airtableSchemaUrl = `https://api.airtable.com/v0/meta/bases/${selected_base}/tables`;

    // Use Pipedream API Proxy to send a GET request to the Airtable API
    const schemaResponse = await pd.makeProxyRequest(
      {
        searchParams: {
          account_id: airtableAccount.account_id,
          external_user_id: syncRecord.user_id,
        },
      },
      {
        url: airtableSchemaUrl,
        options: {
          method: "GET",
        },
      },
    );
    console.log(typeof schemaResponse); // <--- OBJECT
Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtracked internallyIssue is also tracked in our internal issue trackertriagedFor maintainers: This issue has been triaged by a Pipedream employee

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions