small fix

This commit is contained in:
Artemy
2025-07-24 14:45:01 +07:00
parent 73f22a3ace
commit 53ea25f9fd
5 changed files with 26 additions and 23 deletions
@@ -36,7 +36,7 @@ public class FriendsRequestQueryController : Controller
{
var result = await _friendsService.GetIncomingAsync(_currentUserService.GetCurrentUserId());
var response = _mapper.Map<List<FriendshipDto>>(result);
return Ok(response);
}
catch (InvalidOperationException ex)
@@ -44,6 +44,11 @@ public class FriendsRequestQueryController : Controller
_logger.LogWarning(ex, ex.Message);
return Ok(new List<FriendshipDto>());
}
catch (UnauthorizedAccessException ex)
{
_logger.LogWarning(ex, ex.Message);
return Forbid(ex.Message);
}
catch (Exception ex)
{
_logger.LogError(ex, ex.Message);
@@ -70,6 +75,11 @@ public class FriendsRequestQueryController : Controller
_logger.LogWarning(ex, ex.Message);
return Ok(new List<FriendshipDto>());
}
catch (UnauthorizedAccessException ex)
{
_logger.LogWarning(ex, ex.Message);
return Forbid(ex.Message);
}
catch (Exception ex)
{
_logger.LogError(ex, ex.Message);