mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
20 lines
604 B
C#
20 lines
604 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Bloxstrap.Exceptions
|
|
{
|
|
internal class HttpResponseException : Exception
|
|
{
|
|
public HttpResponseMessage ResponseMessage { get; }
|
|
|
|
public HttpResponseException(HttpResponseMessage responseMessage)
|
|
: base($"Could not connect to {responseMessage.RequestMessage!.RequestUri} because it returned HTTP {(int)responseMessage.StatusCode} ({responseMessage.ReasonPhrase})")
|
|
{
|
|
ResponseMessage = responseMessage;
|
|
}
|
|
}
|
|
}
|