public LoginResponse ValidateCredentials(LoginRequest request) { try { return(Authentication.ValidateCredentials(request)); } catch (Exception ex) { throw ex; } }
public IActionResult ValidateCredentials([FromBody] LoginRequest request) { try { return(Ok(Authentication.ValidateCredentials(request))); } catch (CodeLabException ex) { return(ExceptionHandeling.GenerateErrorResponse(ex)); } catch (Exception ex) { CodeLabException codelabExp = new CodeLabException { ErrorCode = (int)ErrorCode.General_Error, SubErrorCode = (int)GeneralError.Some_Thing_Went_Wrong, ErrorReferenceNumber = "UU-266169856" }; //codelabExp.ExtraInfoMessage = "call failed because " + Constants.GeneralErrorDic[GeneralError.Some_Thing_Went_Wrong]; codelabExp.ExtraInfoMessage = ex.Message; return(ExceptionHandeling.GenerateErrorResponse(codelabExp)); } }