Skip to content

[Bug]: Issues with Vapor Core V2.41.0 - Custom Lambda Events #9

@jbardnz

Description

@jbardnz

What happened?

Hey team,

I've used this package for some time, i've just upgraded to vapor-core V2.41.0. Since upgrading i'm getting this error in Sentry:

InvalidArgumentException
Unknown event type. Please create a vapor:handle command to handle custom events.

Looking at the payload of the event it looks like this:

{
    "Records": [
        {
            "messageId": "cb3af733-2069-4cb0-a43d-596bc91f1bd4",
            "receiptHandle": "AQEBicx1FZxysPr1znmllC4wda635Rf66pgsDEef4\/EqvElJFAdJNaBvvTU\/uXcAcjrKT3PbB0mOD3o0Wm+G5KLo5sayNIPA61QRMWzeNKt\/NidJsta96n6P8jA6GchE2mpVO9YsuW42mP\/jI1xPSi7OH7zQ6Z1vBvnyC6uF\/6ijGWyCnt+iw9RfoXHWXHRQop6HEQY9guSR0QJy7h0zopRXukS4gJTkCEA+XFJ\/3Hx50JRBBy2WHMOlXZ04CUv+8fGFT63ouFIfCAQZ0T7vhePEbIvAXmfqiRVbPKrIhLwn8Xy+egnYIOH4DrT\/bITC1IRv7QYUUIQPZWiqIcNJr9Rg38pXxVj+dt4MhGA9jTy4iofnntL6NJuYwicoR440NMZ9",
            "body": "{\"pointer\":\"bulk-jobs\\\/fdfb81fc-229a-41f8-a4dd-8c2fd0ee807a.json\"}",
            "attributes": {
                "ApproximateReceiveCount": "1",
                "SentTimestamp": "1759883646850",
                "SenderId": "AROAR3JNT3PZUWUHKON55:vapor-cloudfuse-production-d",
                "ApproximateFirstReceiveTimestamp": "1759883646857"
            },
            "messageAttributes": [],
            "md5OfBody": "5e583ec8fb4a1590d27c36d88ac1c8e2",
            "eventSource": "aws:sqs",
            "eventSourceARN": "arn:aws:sqs:us-east-1:127334079475:general",
            "awsRegion": "us-east-1"
        }
    ]
}

I can tell this is coming from this package as the body.pointer location matches the config.sqs.disk_options.prefix that I have set.

Information about the V2.41.0 change is here.

How to reproduce the bug

Install the latest version of vapor-core and trigger a disk based SQS job.

Package Version

1.1.0

PHP Version

8.3.0

Which operating systems does with happen with?

No response

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions