I'm trying to pass type: new Error("Expired Token") from Authorizers Lambda to Gateway Response but it not work. I just can pass type: new Error("Unauthorized"). But I have three case:
- Missing Authentication Token
- Unauthorized
- Expired Token
I try to use custom with: {"message":"$context.authorizer.messageText"}. But case not run to it "Missing Authentication Token". Anyone have solution for it? help me please!