Skip to content

Error using passthrough_create method #41

@ahmontero

Description

@ahmontero

Method passthrough_create from PassthroughApi gives me this error:

MergePythonSDK.shared.exceptions.ApiTypeError: Invalid type for variable 'response'. Required value type is dict and passed type was str at ['received_data']['response']

The code I am using is:

# client is configured properly
passthrough_api = PassthroughApi(self.client)

# Variable values:
# method =  'GET'
# path = '/job-applications/xxxx'
# kwargs = {'headers': {'X-Api-Version': '20220708'}, 'request_format': 'JSON'}
data_passthrough_request = DataPassthroughRequest(method, path, **_kwargs)
resp = self.passthrough_api.passthrough_create(data_passthrough_request) # <- Exception raised

I have debugged the code in your library and at the end the request is sent with this info (some data omitted):

URL: https://api.merge.dev/api/ats/v1/passthrough
Method: Post
Body :

{'base_url_override': None, 'data': None, 'headers': {'X-Api-Version': '20220708'}, 'method': 'GET', 'multipart_form_data': None, 'normalize_response': False, 'path': '/job-applications/xxxx', 'request_format': 'JSON'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions