public IActionResult AddRequest(LeaveRequest leaverequest) { try { return(Ok(_leaveService.AddRequest(leaverequest))); } catch (Exception ex) { message = ex.Message; _log.LogError(message); return(StatusCode(StatusCodes.Status500InternalServerError, message)); } }