Reconstructs the specific ModelHealthError subclass from a thrown WASM error.
Falls back to the generic ModelHealthError (or wraps a non-Error throw as one) when
the thrown value doesn't carry recognized code/subCode/statusCode properties —
e.g. an error from outside the WASM boundary.
Reconstructs the specific
ModelHealthErrorsubclass from a thrown WASM error.Falls back to the generic
ModelHealthError(or wraps a non-Error throw as one) when the thrown value doesn't carry recognizedcode/subCode/statusCodeproperties — e.g. an error from outside the WASM boundary.