Skip to content

CX Improper_Exception_Handling @ Controllers/RegistrationsController.cs [Merge_Branch]

Improper_Exception_Handling issue exists @ Controllers/RegistrationsController.cs in branch Merge_Branch

The method Post at line 30 of Controllers\RegistrationsController.cs performs an operation that could be expected to throw an exception, and is not properly wrapped in a try-catch block. This constitutes Improper Exception Handling.

Severity: Low

CWE:248

Checkmarx

Training Recommended Fix

Lines: 45 46 30


Code (Line #45):

         _context.Users.Add(user);

Code (Line #46):

         _context.SaveChanges();

Code (Line #30):

            Where(b => b.email == registrationRequest.email).

Edited by Gabriel Prevelate