public ElvantoException(ElvantoApiError apierror, HttpResponseMessage rawHttpResponseMessage = null) : base(formatMessage(apierror)) { Detail = apierror.Error.ErrorMessage; Code = apierror.Error.ErrorCode; RawHttpResponseMessage = rawHttpResponseMessage; }
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(); }