wolverine-ai 5.3.4 → 5.3.5
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wolverine-ai",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.5",
|
|
4
4
|
"description": "Self-healing Node.js server framework powered by AI. Catches crashes, diagnoses errors, generates fixes, verifies, and restarts — automatically.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -160,6 +160,8 @@ async function x402Plugin(fastify, opts) {
|
|
|
160
160
|
// Verify via facilitator
|
|
161
161
|
try {
|
|
162
162
|
console.log(` 💰 x402 verify: from=${decodedPayment.payload?.authorization?.from} value=${decodedPayment.payload?.authorization?.value} network=${decodedPayment.network}`);
|
|
163
|
+
console.log(` 💰 x402 payload: ${JSON.stringify(decodedPayment).slice(0, 300)}`);
|
|
164
|
+
console.log(` 💰 x402 requirements: ${JSON.stringify(actualRequirements).slice(0, 300)}`);
|
|
163
165
|
const verifyResult = await _facilitatorClient.verify(decodedPayment, actualRequirements);
|
|
164
166
|
if (!verifyResult.isValid) {
|
|
165
167
|
console.log(` ⚠️ x402 verify failed: ${verifyResult.invalidReason} ${verifyResult.invalidMessage || ""}`);
|
|
@@ -167,8 +169,10 @@ async function x402Plugin(fastify, opts) {
|
|
|
167
169
|
return;
|
|
168
170
|
}
|
|
169
171
|
} catch (err) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
// Extract detailed error from the x402 SDK
|
|
173
|
+
const detail = err.invalidReason || err.invalidMessage || err.cause?.message || "";
|
|
174
|
+
console.log(` ⚠️ x402 verify error: ${err.message} | ${detail}`);
|
|
175
|
+
reply.code(402).send({ error: err.invalidReason || err.message, message: err.invalidMessage || detail, accepts: [paymentRequirements] });
|
|
172
176
|
return;
|
|
173
177
|
}
|
|
174
178
|
|