Skip to content

400 Bad Request / InvalidQueryStringException Error when using Nova and Laravel Vapor #5339

@amcfarlane

Description

@amcfarlane
  • Laravel Version: 9.48.0
  • Nova Version: 4.22.0

When you try to detach a MorphToMany field when using Laravel Vapor and Nova you get the following error:

Request URL: https://example.lambda-url.us-example-1.on.aws/nova-api/users/detach?search=&filters=W10%3D&trashed=&viaResource=cars&viaResourceId=3&viaRelationship=&resources[]=11
Request Method: DELETE
Status Code: 400 Bad Request

Connection: keep-alive
Content-Length: 16
Content-Type: application/json
Date: Mon, 20 Feb 2023 14:54:20 GMT
x-amzn-ErrorType: InvalidQueryStringException
x-amzn-RequestId: example-2078-491f-ac60-7d36acfe2922

This is due to the double bracket within "resources[]", a limitation of the API Gateway Lambda Proxy. It may need "percent-encoding" of the query string to work.

https://stackoverflow.com/questions/53371401/invalidquerystringexception-on-aws-iam-secured-api-gateway-lambda-proxy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions