Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#1114·nuqs

AWS API Gateway returns 400 when {} are present in query values

Author: aldenquimbyCreated Sep 2, 2025Updated Mar 18, 2026
Labelsbug

Context

What's your version of nuqs?

    "nuqs": "2.5.2",

What framework are you using?

  • ✅ Next.js (app router)

Which version of your framework are you using?

    "next": "14.2.32",

Description

  • Requests to AWS API Gateway with {} in query values fail with 400 bad request (and appear to hard-crash the gateway, because no execution or access logs appear in CloudWatch for these requests)
  • I am trying to use parseAsJson, which ends up serializing { hello: ['a', 'b'] } as {%22hello%22:[%22a%22,%22b%22]}
  • I expect {} to be URL-escaped into %7B and %7D respectively
  • :, [, and ] do not need to be escaped - AWS API Gateway works fine with those as-is

Reproduction

  • I do not have any public API Gateway services right now
  • I could look into creating one if needed

Related

  • #1069
  • #1068
  • #925

Source: 47ng/nuqs

View original on GitHubView discussion on GitHub