Пример #1
0
        public ElvantoException(ElvantoApiError apierror, HttpResponseMessage rawHttpResponseMessage = null) : base(formatMessage(apierror))
        {
            Detail = apierror.Error.ErrorMessage;
            Code   = apierror.Error.ErrorCode;

            RawHttpResponseMessage = rawHttpResponseMessage;
        }
Пример #2
0
        private static string formatMessage(ElvantoApiError apierror)
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine($"Code: {apierror.Error.ErrorCode}");
            builder.AppendLine($"Detail: {apierror.Error.ErrorMessage}");
            return(builder.ToString());

            throw new NotImplementedException();
        }