Add http status code to error object