Question
Renato Araujo · Feb 20

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:

If I select to display the Body of the Response, I get the 'readable' form of %Status:


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

Product version: IRIS 2021.1
$ZV: IRIS for Windows (x86-64) 2020.1 (Build 215U) Mon Mar 30 2020 20:14:33 EDT [HealthConnect:2.1.0]
0
0 160
Discussion (1)1
Log in or sign up to continue

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.