This commit is contained in:
37
server/ControllerHelpers/ApiError.cs
Normal file
37
server/ControllerHelpers/ApiError.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using Sockeye.Biz;
|
||||
|
||||
namespace Sockeye.Api.ControllerHelpers
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ApiError
|
||||
{
|
||||
public string Code { get; }
|
||||
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public List<ApiDetailError> Details { get; internal set; }
|
||||
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Message { get; }
|
||||
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Target { get; }
|
||||
|
||||
public ApiError(ApiErrorCode apiCode, string message = null, string target = null)
|
||||
{
|
||||
Code = ((int)apiCode).ToString();
|
||||
Target = target;
|
||||
Message=message;
|
||||
}
|
||||
|
||||
}//eoc
|
||||
|
||||
|
||||
}//eons
|
||||
Reference in New Issue
Block a user