Small issue with rest.post on error