I am not a fan of depending on the textual content of a message. Instead, why don't you return a tuple? This is used in the payment system, i.e., "return (1, 'status message')" that way the message can be opaque (and potentially translated in the future) and you always have a clear return value.