rest use proper http return code