From a8186ac0816ccb8938be9637bf5c1350f4fe3423 Mon Sep 17 00:00:00 2001 From: Yoshida Hiroshi Date: Thu, 14 Nov 2024 13:05:11 +0900 Subject: [PATCH] =?UTF-8?q?aws=20=E3=81=AE=E5=86=8D=E6=8E=A5=E7=B6=9A?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E3=81=AB=20InternalFailureException=20?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 3 +++ amazon_transcribe_handler.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index eb4e508..ccaeb8e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,9 @@ ## develop +- [CHANGE] aws の再接続条件の exception に InternalFailureException を追加する + - @Hexa + ### misc ## 2024.5.1 diff --git a/amazon_transcribe_handler.go b/amazon_transcribe_handler.go index eeb0d11..e374d3f 100644 --- a/amazon_transcribe_handler.go +++ b/amazon_transcribe_handler.go @@ -193,7 +193,8 @@ func (h *AmazonTranscribeHandler) Handle(ctx context.Context, reader io.Reader) // 復帰が不可能なエラー以外は再接続を試みる switch err.(type) { - case *transcribestreamingservice.LimitExceededException: + case *transcribestreamingservice.LimitExceededException, + *transcribestreamingservice.InternalFailureException: // リトライしない設定の場合、または、max_retry を超えた場合はクライアントにエラーを返し、再度接続するかはクライアント側で判断する if (at.Config.MaxRetry < 1) || (at.Config.MaxRetry <= h.GetRetryCount()) { if err := encoder.Encode(NewSuzuErrorResponse(err)); err != nil {