use status header instead of manually mapping response codes