TD-24005: SalJSON issues

Report bugs and possible workarounds.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 691
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

TD-24005: SalJSON issues

Post by Dave Rabelink » 16 Apr 2018, 06:03

The following issues have been found using SalJSON functionality.
(TD 7.x)

1) A HTTP GET service can be designed NOT to return JSON responses. So the service will not return any data.
The service is checked using the HTTP status code (eg 200=Ok, 400, 401 etc).

The TD SalJSON functions will return FALSE and give an internal error "Invalid JSON response".
But this is a valid situation. It seems TD expects a JSON response in all cases and will return FALSE when the service does not respond with data.
Even on status 200=ok.
Therefore TD SalJSON functions are not able to process these kind of REST services.

2) A JSON response is not deserialized to the UDV variable when an error occurs.
When a service returns data (eg an error JSON response object) but the service did not have status 20x = ok, TD will ignore the JSON response.
The SalJSON functions will return FALSE but will not put the JSON response in the TD UDV which makes it impossible to react to the error message given back from the service.


For now these issues have been registered as:

Ticket # 3737081: SalJSON issues
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 155
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

SalJSON issues

Post by Igor Ivanovic » 16 Apr 2018, 12:10

Dave,

Is it the same in the 7.1 beta also?
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 691
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

SalJSON issues

Post by Dave Rabelink » 17 Apr 2018, 05:58

Hi Igor,

Yes, tested using the latest beta build. No difference with TD 7.0
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 691
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

TD-24005: SalJSON issues

Post by Dave Rabelink » 18 Apr 2018, 13:44

This ticket has this assigned defect number:

TD-24005: SalJSON issues when using a specific JSON service
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 0 guests