private static string CreateMessage(UploadFinalizeCommandResult response) { var error = response?.ProcessingInfo?.Error; return(error == null ? response?.Json ?? "Upload failed." : (error.Message != null ? error.Name + ": " + error.Message : error.Name)); }
private static string CreateMessage(UploadFinalizeCommandResult response) { var error = response?.ProcessingInfo?.Error; return error == null ? response?.Json ?? "Upload failed." : (error.Message != null ? error.Name + ": " + error.Message : error.Name); }
/// <summary> /// Initializes a new instance of the <see cref="MediaProcessingException"/> class. /// </summary> /// <param name="response">The response from media/upload.</param> public MediaProcessingException(UploadFinalizeCommandResult response) : base(CreateMessage(response)) { this.Response = response; }
/// <summary> /// Initializes a new instance of the <see cref="MediaProcessingException"/> class. /// </summary> /// <param name="response">The response from media/upload.</param> public MediaProcessingException(UploadFinalizeCommandResult response) : base(CreateMessage(response)) { this.Response = response; }