@armory-sh/middleware-hono 0.3.15 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +5 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22,10 +22,13 @@ var paymentMiddleware = (config) => {
22
22
  }
23
23
  let paymentPayload = null;
24
24
  try {
25
+ console.log("[x402 Debug] Raw payment header:", paymentHeader);
25
26
  paymentPayload = decodePaymentV2(paymentHeader);
26
- } catch {
27
+ console.log("[x402 Debug] Decoded payload:", JSON.stringify(paymentPayload, null, 2));
28
+ } catch (e) {
29
+ console.error("[x402 Debug] Decode error:", e);
27
30
  c.status(400);
28
- return c.json({ error: "Invalid payment payload" });
31
+ return c.json({ error: "Invalid payment payload", details: String(e) });
29
32
  }
30
33
  if (!paymentPayload) {
31
34
  c.status(400);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armory-sh/middleware-hono",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "license": "MIT",
5
5
  "author": "Sawyer Cutler <sawyer@dirtroad.dev>",
6
6
  "type": "module",