Return proper http response codes.