Page 1 of 1

JSONToXML Service Exception

Posted: September 22nd, 2022, 6:53 pm
by CathyC
We are calling an api in platform4 and when it returns, if it fails, the response is in json. we use this service to convert to xml so we can get the error message to return from the method output. But when the api is successful, its in xml.

The issue is that we cant tell when its successful or not so we just always pass the response to the service JSONToXML. It throws an exception when its successful because its not in JSON.
image.png
I think it should not return an exception if what it was asked to do is already done. Does this seem like a valid use?
Or how should we build this instead if thats not reasonable?

Re: JSONToXML Service Exception

Posted: August 1st, 2023, 8:07 am
by JustinVanRegenmorter
Task 11518 has been created to discuss this suggestion and issue. This post will be updated when there is a resolution.