Files
Nemera/src/Lumina.Presentation.Web/Common/Exceptions/CurrentUserAuthorizationException.cs
T
BinaryAlley 0a86f1a70b Replaces the custom EmptyRequest with explicit API client operations
Removes the Web-specific EmptyRequest record struct and keeps FastEndpoints.EmptyRequest only as an endpoint request DTO.

Adds bodyless and response-ignoring client overloads, centralizes request construction and response disposal, and separates stale-session failures from generic 404 responses.

Updates the API client stub and tests, including regression coverage for non-empty response bodies, overload selection, and crafted theme asset paths.
2026-11-20 08:52:59 +02:00

24 lines
1.2 KiB
C#

#region ========================================================================= USING =====================================================================================
using Lumina.Presentation.Web.Common.DTO.Common;
using System.Net;
#endregion
namespace Lumina.Presentation.Web.Common.Exceptions;
/// <summary>
/// Exception for an unsuccessful current-user authorization check, which means that the stored session refers to a user the API no longer knows.
/// </summary>
public class CurrentUserAuthorizationException : ApiException
{
/// <summary>
/// Initializes a new instance of the <see cref="CurrentUserAuthorizationException"/> class.
/// </summary>
/// <param name="problemDetails">The problem details object returned by the API.</param>
/// <param name="httpStatusCode">The HTTP status code returned by the API.</param>
/// <param name="requestPath">The absolute path of the API endpoint that produced this exception.</param>
public CurrentUserAuthorizationException(ProblemDetailsDto? problemDetails, HttpStatusCode httpStatusCode, string? requestPath = null)
: base(problemDetails, httpStatusCode, requestPath)
{
}
}