let json return custom failure codes

ok