then you could set statusCode and do setHeader in inverse order