using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; namespace Octokit { /// /// Error payload from the API reposnse /// #if !NETFX_CORE [Serializable] #endif [DebuggerDisplay("{DebuggerDisplay,nq}")] public class ApiError { public ApiError() { } public ApiError(string message) { Message = message; } public ApiError(string message, string documentationUrl, IReadOnlyList errors) { Message = message; DocumentationUrl = documentationUrl; Errors = errors; } /// /// The error message /// public string Message { get; protected set; } /// /// URL to the documentation for this error. /// public string DocumentationUrl { get; protected set; } /// /// Additional details about the error /// public IReadOnlyList Errors { get; protected set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Message: {0}", Message); } } } }