The strata server can indicate an error to the client either as HTTP error codes and/or STRATA_CODE headers, and both of these can additionally have either a STRATA_MESSAGE header and/or a response body containing the error message. The response body can be XML or HTML (or potentially Text), the STRATA_MESSAGE will be XML.
Additionally, responses from the strata client library are not exclusively either success or failure, a response can indicate some combination of success and failure. A single 'action' on the part of the client, for example creating a case, can involve multiple interactions with the server, POST to create the case, and one or more POSTs to attach files. If for example, the case creation POST succeeds, but one of the attach POSTs fails, then the response must clearly indicate both.
Whatever the response(s) from the strata server, theses need to be converted to a single 'text' (optionally with an additional URL) response message for display by the report library. The HTML and XML need to be converted to text, either by 'formatting' it, or by ignoring it, and mapping the codes to error messages.
Advice from the Strata Server developer, Tim Walsh was:
For the time being just read the STRATA_CODE and STRATA_MESSAGE headers and if there is an error condition then skip the body.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release. Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release. This request is not yet committed for
While this bz was fixed in report-0.14-1, it will not be testable/verifiable in default RHEL6 until strata is enabled in RHEL6:
This bz was about making the Strata client more general, so it could gracefully handle future changes to the Strata server. I was able to test this earlier by introducing temporary changes in the server, and then testing the client.
The easiest way to test this now would be to build a 'test server' and have it do things that exersise this functionality in the client. I don't have time to do this, and I don't think it is actually worth it to do at this point in time.
Would it be possible for me to just say this is verified? Or would that be short circuiting the process.
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.