Fix result handling of module:handle_error/3

In `process_result/3`, the result of `Module:handle_error/3` should be updated to the `state` field instead of `module`.