ContentfulException.cs
1.33 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Contentful.Core.Models;
namespace Contentful.Core.Errors
{
/// <summary>
/// Represents errors that occurr when calling the Contentful APIs.
/// </summary>
public class ContentfulException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="ContentfulException"/> class.
/// </summary>
/// <param name="statusCode">The http status code of the exception.</param>
/// <param name="message">The message of the exception.</param>
public ContentfulException(int statusCode, string message) : base(message)
{
StatusCode = statusCode;
}
/// <summary>
/// The http status code of the exception.
/// </summary>
public int StatusCode { get; set; }
/// <summary>
/// Common system managed metadata properties.
/// </summary>
public SystemProperties SystemProperties { get; set; }
/// <summary>
/// The details of the exception.
/// </summary>
public ErrorDetails ErrorDetails { get; set; }
/// <summary>
/// The ID of the request to the Contentful API.
/// </summary>
public string RequestId { get; set; }
}
}