added method error_as_text that returns error as a plain dictionary with status and messages, add other fields like agent_add1, agent_add2 etc.