summaryrefslogtreecommitdiffstats
path: root/src/Cepis/InvalidResponseException.cs
diff options
context:
space:
mode:
authorMurilo Ijanc <[email protected]>2026-07-26 12:42:38 -0300
committerMurilo Ijanc <[email protected]>2026-07-26 13:10:34 -0300
commita2b10fd494fb389e556e40134031eb86e56e11e7 (patch)
tree08b6df8a06f2c7c15488b90d57a6d8286cd57a22 /src/Cepis/InvalidResponseException.cs
downloadcsharp-a2b10fd494fb389e556e40134031eb86e56e11e7.tar.gz
Initial importv0.1.0
Diffstat (limited to 'src/Cepis/InvalidResponseException.cs')
-rw-r--r--src/Cepis/InvalidResponseException.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Cepis/InvalidResponseException.cs b/src/Cepis/InvalidResponseException.cs
new file mode 100644
index 0000000..e0be6b5
--- /dev/null
+++ b/src/Cepis/InvalidResponseException.cs
@@ -0,0 +1,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)
+ {
+ }
+}