aws / aws/aws-lambda-go

Problem with Custom Authorizers

Open
#81 2 comments 5 reactions 0 assignees View on GitHub
troubleshooting
Dominant language
Go
Stars
3.8k
Forks
578
Avg merge
8h 18m
Merged PRs (30d)
1

Description

I'm trying to implement a custom authorizer and so far, it has gone very well and it's all working perfectly fine.

However, the one major issue I am having is that I cannot return a custom error message if the authenticator fails. I am having the return the following for every error at the moment:

`return &events.APIGatewayCustomAuthorizerResponse{}, errors.New("Unauthorized")`.

If I try any other error message, I get `{"message": null}` as the response on my client. Is there any way to customize this error message (preferably without using the AWS console as I'd like it to be automated)?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.