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

400 errors when creating a new custom integration #14

Open
brandon-kucera opened this issue Dec 13, 2023 · 1 comment
Open

400 errors when creating a new custom integration #14

brandon-kucera opened this issue Dec 13, 2023 · 1 comment

Comments

@brandon-kucera
Copy link

brandon-kucera commented Dec 13, 2023

Running:

with sunshine_conversations_client.ApiClient(self.__sunco_config) as api_client:
    api_instance = sunshine_conversations_client.IntegrationsApi(api_client)
        integration = sunshine_conversations_client.Integration(
            type="custom"
        )
    try:
        api_response = api_instance.create_integration(self.__sunco_app_id, integration)
        pprint(api_response)
    except sunshine_conversations_client.ApiException as e:
        print("Exception when calling IntegrationsApi->create_integration: %s\n" % e)

Results in:
HTTP response body: {"errors":[{"code":"bad_request","title":"should have required property 'webhooks'"}]}

As far as I can tell webhooks is not required when creating a new custom integration, it is not clear to me where I should even be setting this.

@brandon-kucera brandon-kucera changed the title 400 errors when creating a new custom integration``` 400 errors when creating a new custom integration Dec 13, 2023
@brandon-kucera
Copy link
Author

while I'm here - there are some pretty dubious errors coming back even when I hit the HTTP API directly.

request body:
{'type': 'custom', 'displayName': 'brandonk', 'webhooks': [{'target': 'target', 'triggers': 'ee'}]}
error:
('{"errors":[{"code":"bad_request","title":".webhooks: should not have more ' 'than 1 items"}]}')

request body:
{'type': 'custom', 'displayName': 'brandonk', 'webhooks': []}
error:
('{"errors":[{"code":"bad_request","title":"should have required property ' '\'webhooks\'"}]}')

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