PelionIoT / mbed-connector-api-python

python library for using connector.mbed.com
Apache License 2.0
2 stars 2 forks source link

I put a non-existing callbackURL, and my request still finished #7

Open janjongboom opened 8 years ago

janjongboom commented 8 years ago

I have this code:

        e = connector.getEndpoints()
        while not e.isDone():
            None
        if e.error:
            raise Error(e.error)

And a URL which returns 405 Method not allowed.

However no error was raised.

It looks like it's not waiting for the request to finish at all actually... isDone() is True immediately after executing the function, which cannot be the case.

BlackstoneEngineering commented 8 years ago

what is the value of e.result once this code is run?

BlackstoneEngineering commented 8 years ago

Also getEndpoints does not require a notification channel, for some reason calls like getAPIVersion and getLimits do not need a notification channel, but async calls like getResourceValue do. So not surprised that this worked.