J.

Jev Webhook failure recovery Code Example

Choose between retrying, repairing, and asking for help.

Missing required customer_id

Status 422
Response Missing required customer_id
Retry Count 2

What should the workflow do next?

0% Repair payload.
Repair payload 83%
Retry unchanged 12%
Wait 5%

Let the application repair payload.

Code
Conceptual pseudocode — not official Jev SDK syntax
// Conceptual pseudocode — not Jev SDK syntax
const state = {
  "status": 422,
  "response": "Missing required customer_id",
  "retry_count": 2
};

const decision = await evaluateDecision({
  state,
  question: "What should the workflow do next?",
  options: ["Repair payload","Retry unchanged","Wait"],
});

// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Repair payload"
    && decision.probability >= 0.85) {
  queuePayloadRepair(decision);
} else {
  queueForReview(decision);
}

This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.