trying a persistent version of rest-client, added errors object, now handles structures that arent objects