public async Task <IActionResult> GetBehaviorByIPAsync([FromRoute] string ip, CancellationToken cancellationToken = default) { try { if (string.IsNullOrWhiteSpace(ip)) { return(BadRequest()); } var result = await _behaviorAppService.GetBehaviorsByIPAsync(ip, cancellationToken); if (!result.Any()) { return(NotFound()); } return(Ok(result)); } catch (Exception ex) { return(StatusCode(500, ex.Message)); } }