summaryrefslogtreecommitdiffstats
path: root/src/Cepis/InvalidResponseException.cs
blob: e0be6b5789991942ac32f961f4e6af8c9036667c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
namespace Cepis;

/// <summary>
/// A success status came back with a body that cannot be parsed.
/// </summary>
/// <remarks>
/// In practice this means something between you and the API is answering
/// instead of it — a captive Wi-Fi portal, a corporate proxy, an HTML error
/// page. Useful as a diagnosis: the problem is not in your code.
/// </remarks>
public sealed class InvalidResponseException : CepisException
{
    /// <summary>Create the exception with a message.</summary>
    /// <param name="message">what went wrong</param>
    public InvalidResponseException(string message)
        : base(message)
    {
    }

    /// <summary>Create the exception with a message and an underlying cause.</summary>
    /// <param name="message">what went wrong</param>
    /// <param name="innerException">the parse failure underneath</param>
    public InvalidResponseException(string message, Exception? innerException)
        : base(message, innerException)
    {
    }
}