Skip to content

Commit 3484190

Browse files
committed
Improve error message in BlinkClient.cs for content type
Updated the exception message in BlinkClient.cs to include the actual content type received instead of the video.ManifestId when the content type is not "video/mp4". This change provides more relevant information about the failure.
1 parent 0f3d1b0 commit 3484190

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Blink/BlinkClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public async Task<byte[]> GetVideoAsync(BlinkVideoInfo video)
246246
string contentType = response.Content.Headers.ContentType?.MediaType ?? string.Empty;
247247
if (contentType != "video/mp4")
248248
{
249-
throw new BlinkClientException($"Failed to get video {video.Id}, manifest {video.ManifestId} - {response.ReasonPhrase}");
249+
throw new BlinkClientException($"Failed to get video {video.Id}, contentType {contentType} - {response.ReasonPhrase}");
250250
}
251251
return await response.Content.ReadAsByteArrayAsync();
252252
}

0 commit comments

Comments
 (0)