Tiny comment : isn't it a bit too much to return the ```code``` property twice ?