34 lines
923 B
C#
34 lines
923 B
C#
using System;
|
|
using System.Linq;
|
|
using System.Collections.Generic;
|
|
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
|
using Microsoft.Extensions.Logging;
|
|
using Newtonsoft.Json;
|
|
using Sockeye.Biz;
|
|
|
|
namespace Sockeye.Api.ControllerHelpers
|
|
{
|
|
|
|
|
|
|
|
public class ApiNotAuthorizedResponse
|
|
{
|
|
|
|
[JsonIgnore]
|
|
private ILogger log = Sockeye.Util.ApplicationLogging.CreateLogger<ApiNotAuthorizedResponse>();
|
|
|
|
//Mandatory properties
|
|
public ApiError Error { get; }
|
|
|
|
//Generic error
|
|
public ApiNotAuthorizedResponse()
|
|
{
|
|
Error = new ApiError(ApiErrorCode.NOT_AUTHORIZED, ApiErrorCodeStockMessage.GetTranslationCodeForApiErrorCode(ApiErrorCode.NOT_AUTHORIZED));
|
|
|
|
log.LogDebug("ApiErrorCode={0}, message={1}", (int)ApiErrorCode.NOT_AUTHORIZED, Error.Message);
|
|
}
|
|
|
|
}//eoc
|
|
|
|
|
|
}//eons |