Customize Gateway Websocket Error Event

0

Hi there, Is there any way to customize the object that the frontend receives in a websocket error event? Because we are receiving some errors that come as message in the action. Thank you.

1回答
0

You can customize the error response in a websocket using api gateway's integration response. This allows you to define how errors are structured and what data they contain when they're sent to the frontend via websocket. You can configure the integration response to map specific error messages or attributes from Lambda or other backend services to the websocket error event payload.

  1. Integration response mapping -> Integration response and configure mapping templates which can be used to define error attributes such as status code, error message, headers etc

https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-integration-responses.html

profile pictureAWS
回答済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ