GarvSaxena commented on issue #7557: URL: https://github.com/apache/shenyu/issues/7557#issuecomment-6173230678
A possible fix is to change `WasmLoader.getWasmExtern` to check the module export section for the requested name before calling Chicory `instance.export(funcName)`. If the name is absent, return `Optional.empty()`; if an export with that name exists but is not a function, preserve Chicory’s `InvalidException` rather than catching it broadly. This lets optional lifecycle hooks and data-handler callbacks remain no-ops when absent, while existing callers continue to enforce required exports (`execute` via the `WASM_FUNC_NOT_FOUND` response, and required metadata/discovery handlers via initialization errors). Regression coverage should verify a missing optional export, a required export still follows its failure path, and an export name bound to a non-function still fails. The lifecycle behavior should also be reflected in `ABI-v1.md`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
