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

Search Client returns generic errors #275

Closed
NickolausDS opened this issue Jan 23, 2018 · 1 comment
Closed

Search Client returns generic errors #275

NickolausDS opened this issue Jan 23, 2018 · 1 comment

Comments

@NickolausDS
Copy link
Contributor

The following example fails, given that index and sub are valid:

import globus_sdk
sc = globus_sdk.SearchClient()
sc.get_subject(index, sub)

Which results in the following error:

Traceback (most recent call last):
  File "test.py", line 8, in <module>
    rec = sc.get_subject(index, sub)
  File "/usr/local/lib/python3.6/site-packages/globus_sdk/search/client.py", line 275, in get_subject
    return self.get(path, params=params)
  File "/usr/local/lib/python3.6/site-packages/globus_sdk/base.py", line 174, in get
    retry_401=retry_401)
  File "/usr/local/lib/python3.6/site-packages/globus_sdk/base.py", line 387, in _request
    raise self.error_class(r)
globus_sdk.exc.SearchAPIError: (400, 'BadRequest.Generic', '/v1/index/frdr-test/subject requires a query parameter "subject"')

The offending line is here, with the merge_params call. The result sets the parameters to None, resulting in no data being sent in the request.

@sirosen
Copy link
Member

sirosen commented Jan 23, 2018

Per #274, I misread the patch -- flip-flopping the new and old lines.
Perhaps this was based on a bit of a bias, e.g. I assumed that I would use my own helpers correctly...

Anyway, this is closed via #274

@sirosen sirosen closed this as completed Jan 23, 2018
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

2 participants