mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
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.
24 lines
1.2 KiB
C#
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)
|
|
{
|
|
}
|
|
}
|