error correction on basic rest api