16 lines
444 B
C#
16 lines
444 B
C#
using System.Net;
|
|
|
|
namespace Prefab.Shared;
|
|
|
|
/// <summary>
|
|
/// Represents a non-success HTTP response returned by a downstream service.
|
|
/// </summary>
|
|
public sealed class RemoteProblemException(HttpStatusCode statusCode, string? responseBody)
|
|
: Exception($"Remote request failed with status code {(int)statusCode}.")
|
|
{
|
|
public HttpStatusCode StatusCode { get; } = statusCode;
|
|
|
|
public string? ResponseBody { get; } = responseBody;
|
|
}
|
|
|