Add some json error support