How to display %Status in readable form?
Hi all,
I am trying to use a %Status property on some of my Response classes. If the execution of a service goes wrong, I set the %Status property on Response with the value $$$ERROR($$$GeneralError, "pre-defined error message").
When I check the visual trace for this message and look for the %Status (property "status_code" on the image), it is displayed like this:
.png)
If I select to display the Body of the Response, I get the 'readable' form of %Status:
.png)
According to the documentation, this is expected as %Status properties are encoded in base64 during Projection to XML.
So my question is: Is it possible to display the readable form when Projecting to XML?
Regards and thanks!
Renato
Comments
Use calculated properties for one offs:
Property "status_code" As %Status(XMLPROJECTION = "none");
Property "status_code_xml" As %VarString(XMLNAME = "status_code") [ SqlComputeCode = {set {*} = $System.Status.GetErrorText({"status_code"}}, SqlComputed, Transient ];Custom datatypes if it's a repeatable issue.