In Authorizers Lambda only context 401 "Unauthorized" can to pass Gateway Response?

140 views Asked by At

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!

0

There are 0 answers