Skip to content

Commit 5b76aeb

Browse files
authored
Merge pull request #22 from TORISOUP/fix_programinfo
ProgramInfoの例外修正
2 parents 0fe9858 + db232ed commit 5b76aeb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,14 @@ private async UniTask<ProgramInfo> _GetProgramInfoAsync(string programId, Cancel
319319
{
320320
await uwr.SendWebRequest().ToUniTask(cancellationToken: ct);
321321
}
322-
catch (Exception)
322+
catch (Exception ex) when (ex is not OperationCanceledException)
323323
{
324-
throw new ProgramNotFoundException($"{lv} is not found.");
324+
if (uwr.responseCode == 404)
325+
{
326+
throw new ProgramNotFoundException($"{lv} is not found.");
327+
}
328+
329+
throw new NicoliveApiClientException(uwr.downloadHandler.text, ex);
325330
}
326331

327332
var json = uwr.downloadHandler.text;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023.8.28.1
1+
2023.8.29

0 commit comments

Comments
 (0)