Add http code management in js and API proxy