Hi! trying to handle callback from API and get error. Same request through op().request works. Idk it might be related to statusCode 100.
Example request: op.TDResources.WebClient.Request(callback, url, "POST", data=payload_json)
Traceback (most recent call last):
File "/sys/TDResources/webClient/webclient1_callbacks", line 2, in onResponse
File "/sys/TDResources/webClient/WebClientExt", line 74, in onWebResponse
KeyError: 17
@snaut
I am pretty sure they are hitting a 300 or 100 status code which is empty, but has the correct id. In line 75 you are deleting the entry. So when the actual response after the redirect comes in, you have an empty dict and a key-error.
My webclient simply does the following until I have something better to do with the 100 & 300 responses.
if statusCode < 200 and 300 <= statusCode < 400:
self.log("Ignoring Response", statusReason)
return