let json return custom failure codes