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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인