Skip to content
This repository was archived by the owner on Aug 8, 2024. It is now read-only.
This repository was archived by the owner on Aug 8, 2024. It is now read-only.

Doesn't work with raw text bodies #14

@beardyman

Description

@beardyman

I setup a POST route with a handler and the handler never got invoked despite debug mode logging that it found a matching route. The logs just end there.

I was able to eventually reproduce the issue and the response was Unexpected 'b'.

I'm working on a PR to handle text types and add debug logging when the mime type isn't valid but I wanted to bring this up. I got around it by handing that specific route prior to calling the route handler like so:

module.exports.handler = async (event, context, callback) => {
  if (event.path === "/myPath" && event.httpMethod === "POST") {
    return controller.myPath(event, context, callback);
  } else {
    return router.handler(routeConfig)(event, context, callback);
  }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions