I have two particular use cases where I would like the TX REST connector to be able to handle nothing being returned.
- In one case I've configured the portal to do a PUT request. PUT's generally don't return any body.
- In a second case, the API is just configured to do this sometimes. We get ID's from another endpoint that we are then supposed to use dynamically like:
endpoint/{ID}
. The problem is that the source system can have phantom ID's, meaning that ID=13 doesn't really point anywhere.endpoint/13
then returns just a completely empty body.
In both cases the problem seems to be that the connector can't handle this. We get back:
Failed to execute endpoint 'xxx':
Unexpected character encountered while parsing value: }. Path 'TX_Autogenerated_Element', line 1, position 28.
Going of the error message, it would seem that the connector is assuming a json was returned and automatically starts trying to convert is somehow.
I need to be able to handle these situations somehow, since I have no control over the returns of the API.
Also, I already tried to apply a dummy-xslt. The idea was that I could perhaps create a table transform that would simply return a dummy value always. I used this xslt:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<dummy>Dummy Content</dummy>
</xsl:template>
</xsl:stylesheet>
but that did nothing, indicating that the problem occurs before any table transforms.