Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC exception in handler is resolved as undefined #320

Open
1 task done
xxshady opened this issue Jun 30, 2024 · 0 comments
Open
1 task done

RPC exception in handler is resolved as undefined #320

xxshady opened this issue Jun 30, 2024 · 0 comments
Labels
type: bug Something isn't working

Comments

@xxshady
Copy link
Contributor

xxshady commented Jun 30, 2024

Description of the problem

This bug does not present in v2, I created this issue here to let people know it exists in v1

Reproduction steps

import alt from "alt-server";
alt.on("playerConnect", async (player) => {
  const res = await player.emitRpc("test", [1, 2, 3]);
  alt.log({ res }); // logs { res: undefined }
});
import alt from "alt-client";
alt.onRpc("test", async (data) => {
  throw new Error("test error");
});

Expected behaviour

Promise should be rejected with error message as in v2

Additional context

No response

Operating system

Windows 11

Version

16.0.0-dev.318

Scope

shared

Reproduction tested

  • I confirm that I have made sure that this issue is also present on the newest dev version
@xxshady xxshady added the type: bug Something isn't working label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant