public ActionResult GetNotifications(string userId, params ActivityTypes[] activityTypes) { List <Notification> notifications = null; try { ArgumentsValidator.Validate(nameof(userId), userId); ArgumentsValidator.Validate(nameof(activityTypes), activityTypes); notifications = _notifyService.GetNotifications(userId, activityTypes); } catch (ArgumentException ex) { Log.Error(ex, ex.Message); } catch (Exception ex) { Log.Error(ex, $"Something went wrong during {nameof(GetNotifications)} operation."); return(StatusCode(500, ex)); } return(StatusCode(200, notifications)); }