• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

marthijn / Sidio.MailBluster / 13652034488

04 Mar 2025 10:51AM UTC coverage: 94.545% (+1.0%) from 93.559%
13652034488

Pull #34

github

web-flow
Merge 7c473d9d3 into 219c32ff0
Pull Request #34: 🔄 Refactor MailBluster client to use RestSharp

16 of 17 branches covered (94.12%)

Branch coverage included in aggregate %.

105 of 114 new or added lines in 6 files covered. (92.11%)

3 existing lines in 1 file now uncovered.

296 of 313 relevant lines covered (94.57%)

11.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/src/Sidio.MailBluster/MailBlusterHttpException.cs
1
using System.Net;
2
using Sidio.MailBluster.Responses;
3

4
namespace Sidio.MailBluster;
5

6
/// <summary>
7
/// The MailBluster HTTP exception.
8
/// </summary>
9
[Serializable]
10
public class MailBlusterHttpException : MailBlusterApiException
11
{
12
    /// <summary>
13
    /// Initializes a new instance of the <see cref="MailBlusterHttpException"/> class.
14
    /// </summary>
15
    /// <param name="code">The error code.</param>
16
    /// <param name="message">The message.</param>
17
    /// <param name="content">The reseponse content.</param>
18
    /// <param name="innerException">The inner exception.</param>
19
    /// <param name="httpStatusCode">The HTTP status code.</param>
20
    public MailBlusterHttpException(
21
        string? code,
22
        string? message,
23
        HttpStatusCode httpStatusCode,
24
        string? content = null,
25
        Exception? innerException = null)
26
        : base(message, innerException)
4✔
27
    {
28
        Code = code;
4✔
29
        HttpStatusCode = httpStatusCode;
4✔
30
        Content = content;
4✔
31
    }
4✔
32

33
    /// <summary>
34
    /// The raw error code.
35
    /// </summary>
36
    public string? Code { get; }
2✔
37

38
    /// <summary>
39
    /// The HTTP status code.
40
    /// </summary>
41
    public HttpStatusCode HttpStatusCode { get; }
2✔
42

43
    /// <summary>
44
    /// Gets the raw response content.
45
    /// </summary>
NEW
46
    public string? Content { get; }
×
47

48
    /// <summary>
49
    /// The error code.
50
    /// </summary>
51
    public ErrorCode ErrorCode =>
52
        Enum.TryParse<ErrorCode>(Code, true, out var errorCode) ? errorCode : ErrorCode.Unknown;
2✔
53
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc