Example #1
0
        public OutputException(
            Exception exception,
            int httpStatusCode,
            MnemoxStatusCodes mnemoxStatusCode) : base(exception.Message, exception.InnerException)
        {
            HttpStatusCode = httpStatusCode;

            MnemoxStatusCode = mnemoxStatusCode;
        }
 private string CreateErrorDescription(MnemoxStatusCodes statusCode, string message = null)
 {
     return(string.IsNullOrWhiteSpace(message) ?
            JsonSerializer.Serialize(new { errorCode = statusCode.ToString() }) :
            JsonSerializer.Serialize(new { errorCode = statusCode.ToString(), message }));
 }