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

Can I call errorHandler.setUser() before errorHandler.start()? #112

Open
ZYinMD opened this issue Dec 14, 2021 · 0 comments
Open

Can I call errorHandler.setUser() before errorHandler.start()? #112

ZYinMD opened this issue Dec 14, 2021 · 0 comments
Assignees

Comments

@ZYinMD
Copy link

ZYinMD commented Dec 14, 2021

const errorHandler = new StackdriverErrorReporter();
errorHandler.setUser('some_user_id');
errorHandler.start({ ...config, service: 'some_service_name' });

README says setUser can be called "at any time", but I just want to confirm, can I call it before start()?

In my code, I call setUser() when user id becomes available, and call start() when service name becomes available, and I can't guarantee their order.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants