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

Poor errors for invalid pusher return type #1028

Open
aboodman opened this issue Oct 16, 2022 · 3 comments
Open

Poor errors for invalid pusher return type #1028

aboodman opened this issue Oct 16, 2022 · 3 comments
Assignees
Labels
Future Something we want to fix but is not blocking next release

Comments

@aboodman
Copy link
Contributor

See: https://discord.com/channels/830183651022471199/830183651022471202/1031283567906541642

Screen Shot 2022-10-16 at 9 26 29 AM

I used a debug build to see that error was actually:

Screen Shot 2022-10-16 at 9 26 58 AM

We need to handle these errors better and print a more comprehensible error message. Check puller too.

See also: #575. Perhaps should do at same time.

@arv
Copy link
Contributor

arv commented Oct 17, 2022

This is once again our assertion functions not printing context aware errors.

@aboodman
Copy link
Contributor Author

aboodman commented Oct 17, 2022 via email

@arv
Copy link
Contributor

arv commented Oct 18, 2022

Is there a general pattern we can look for in the codebase to find all of
these at once?

Yes. These function all look like:

export function assertIndexDefinitions(
  value: unknown,
): asserts value is IndexDefinitions {
...
}

@arv arv added User Reported Future Something we want to fix but is not blocking next release and removed User Reported labels Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Future Something we want to fix but is not blocking next release
Projects
None yet
Development

No branches or pull requests

2 participants