Skip to content

Problem with Custom Authorizers #81

Open
@justjoeyuk

Description

@justjoeyuk

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)?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions