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

Rutger/fix user error trace #42

Merged
merged 4 commits into from
Feb 17, 2023
Merged

Rutger/fix user error trace #42

merged 4 commits into from
Feb 17, 2023

Conversation

parutger
Copy link
Contributor

Fixes #32 by improving error handling

Changes localhost to 127.0.0.1 for IPv4 only localtest

Include dotenv config to fix local testing environment

The polkadot node does not listen on the IPv6 localhost by default.
This caused failures on systems that resolve localhost to ::1
Enables proper functioning in environments that do not use env vars.
Previously the lack of this caused issues in localtest environments.
@parutger parutger requested a review from a team as a code owner February 17, 2023 11:11
@parutger parutger merged commit 28b2904 into master Feb 17, 2023
@parutger parutger deleted the rutger/fix-user-error-trace branch February 17, 2023 11:35
@@ -95,7 +95,7 @@ export async function tipUser(
unsub();
}
});

await api.disconnect();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this solve the reconnection or runtime upgrade issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, But I am hoping this will solve the memory leak issue that was reported.

try {
tipSize = getTipSize(tipSizeInput);
} catch (error) {
return error.message;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That covers only these 2 methods, but it doesn't for example tipUser or anything else.
I would propose to look into how respondOnResult writes the message in ALL cases, and make sure the trace isn't printed there

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

Successfully merging this pull request may close these issues.

Do not show error trace to the user
3 participants