Refactor to not redirect when not a 3xx code