json changes
Merge pull request #18 from racehub/feature/json_fixes

let json return custom failure codes