private string GetError(string exceptionMessage, ApiDetailedErrorCodes errorCode) { if (!_showErrorDetails) { exceptionMessage = errorCode.GetDescriptionValue(); } var result = JsonConvert.SerializeObject(new ApiError((int)errorCode, errorCode.GetNameValue(), exceptionMessage)); return(result); }
public ApiException(ApiDetailedErrorCodes errorCode) { ErrorCode = errorCode; }