Closed campbellr closed 11 years ago
On my instance, that query returns a HTTP 400 error code, which raises a v1pysdk.V1Error on line 90 of client.py . Can you use Chrome's debugging pane (F12) to see if you're getting the 400 error code on the network request?
Interesting. My server is definitely returning a 400 too, according to Chrome at least.
I'll try to do some more digging around to see why v1pysdk isn't raising this in my case.
So far it seems like there might be something wrong with the custom opener, but I haven't figured out what exactly:
url = <url with invalid 'sel='>
>>> r = v1.server.opener.open(url)
>>> r.code
400
>>> url = <some invalid url>
>>> r = v1.server.opener.open(url)
>>> r.code
404
So even though I'm getting a 400 status code, the opener isn't raising an HTTPError (it does have HTTPDefaultErrorHandler as the default error handler though)
This could have something to do with the fact that I'm using the HTTPNtlmAuthHandler, since that's likely the only real difference.
I managed to fix this in my fork. Let me know if you are interested in merging it and I can create a pull request. Ideally something like this would go into python-ntlm, but seeing as a similar issue has been on the bug-tracker since 2008, I don't know if that's going to happen...
if you still have the code, please do issue a pull request. I apologize for the long delay.
Pulled this commit. thanks.
Example:
select
with valid attributes:select
with an invalid attribute name (eg: Number)This is a bit deceptive, because there is no way of telling if you supplied the
select
wrong, or there actually wasn't anything that matched the query.Interestingly enough, an error is reported by the API, it just isn't propagated to the user:
GET: http://versionone.example.com/VersionOne/rest-1.v1/Data/Scope/71376?sel=Name,Number
Thanks,
Ryan