http status code handling, smplified