Could you please elaborate on what you mean by "adding a setStatus(int code, String msg) method"?
setStatus(int code, String msg)
Could you provide more details and perhaps an example of how you implemented this?