This is so likely to break that it's questionable whether we should even attempt to use it.  Why not just use the message from the server directly as the raised message.  Also, use the standard raise syntax rather than using new.

    RHC::DomainNotFoundException, messages.first['text']