Class WasmShapeException

All Implemented Interfaces:
Serializable

public class WasmShapeException extends RuntimeException
Signals that a WASM shape_response module failed in a way that makes its returned response unusable — it trapped, returned an out-of-bounds or oversized memory region, or returned bytes that are not a valid response JSON object.

This is deliberately distinct from the "module has no shape_response export" and "module opted out" cases, which WasmRuntime.callShape(org.mockserver.wasm.WasmRequest, org.mockserver.wasm.WasmResponse) signals by returning null (no error, no log). A WasmShapeException tells WasmResponseShaper to fall back to the unshaped response and warn once per module, keeping the request fail-safe — a broken shaper never 500s the request.

See Also:
  • Constructor Details

    • WasmShapeException

      public WasmShapeException(String message)
    • WasmShapeException

      public WasmShapeException(String message, Throwable cause)