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

Invalid value "email" for "field_type", must one of "payment_link_radio" error #294

Open
mario-fehr opened this issue Jan 26, 2024 · 6 comments

Comments

@mario-fehr
Copy link

image

Looks like something is wrong with the "oneOf" shema mapping for the "field_types" at the marketing form apis.

@paulknisely
Copy link

paulknisely commented Jan 31, 2024

I am receiving a similar error as well for the following api call through the sdk:

$apiResponse = $client->marketing()->forms()->formsApi()->getPage();
image

@muncherelli
Copy link

Similar error here when calling:

$forms = $this->hubspot->marketing()->forms()->FormsApi()->getPage();

Here is the error:

{
    "title": "InvalidArgumentException",
    "type": "InvalidArgumentException",
    "code": 500,
    "message": "Invalid value 'dropdown' for 'field_type', must be one of 'payment_link_radio'",
    "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/Model/DependentFieldDependentField.php",
    "line": 369,
    "trace": [
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/ObjectSerializer.php",
            "line": 478,
            "function": "setFieldType",
            "class": "HubSpot\\Client\\Marketing\\Forms\\Model\\DependentFieldDependentField",
            "type": "->"
        },
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/ObjectSerializer.php",
            "line": 369,
            "function": "deserialize",
            "class": "HubSpot\\Client\\Marketing\\Forms\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/ObjectSerializer.php",
            "line": 478,
            "function": "deserialize",
            "class": "HubSpot\\Client\\Marketing\\Forms\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/ObjectSerializer.php",
            "line": 369,
            "function": "deserialize",
            "class": "HubSpot\\Client\\Marketing\\Forms\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/ObjectSerializer.php",
            "line": 478,
            "function": "deserialize",
            "class": "HubSpot\\Client\\Marketing\\Forms\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/ObjectSerializer.php",
            "line": 369,
            "function": "deserialize",
            "class": "HubSpot\\Client\\Marketing\\Forms\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/ObjectSerializer.php",
            "line": 478,
            "function": "deserialize",
            "class": "HubSpot\\Client\\Marketing\\Forms\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/Api/FormsApi.php",
            "line": 1067,
            "function": "deserialize",
            "class": "HubSpot\\Client\\Marketing\\Forms\\ObjectSerializer",
            "type": "::"
        },
        {
            "file": "/home/xxx/Sites/xxx/vendor/hubspot/api-client/codegen/Marketing/Forms/Api/FormsApi.php",
            "line": 998,
            "function": "getPageWithHttpInfo",
            "class": "HubSpot\\Client\\Marketing\\Forms\\Api\\FormsApi",
            "type": "->"
        },

@muncherelli
Copy link

workaround:

$response = $this->hubspot->apiRequest([
    'path' => '/marketing/v3/forms/',
]);
$forms = json_decode($response->getBody());

@dimitriBouteille
Copy link

Same error with version 11.1.0 :(

@utilmind
Copy link

utilmind commented Jun 1, 2024

Receiving the same error when calling

$client->marketing()->forms()->formsApi()->create(/* my data*/);

It's produce the following

PHP Fatal error: Uncaught InvalidArgumentException: Invalid value 'email' for 'field_type', must be one of 'payment_link_radio' in /var/www/sc/sdk/vendor/hubspot/api-client/codegen/Marketing/Forms/Model/DependentFieldDependentField.php:472

Although the form successfully created on HubSpot. Just weird fatal error that can't be caught in catch :(

@boboldehampsink
Copy link

Any updates on this?

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

6 participants