Added the HTTP return code check to the controller module.