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

[BUGFIX release] Fix misleading LinkTo error message #19342

Merged
merged 1 commit into from
Jan 18, 2021
Merged

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Jan 18, 2021

This fixes #18640.

An easy way to demonstrate the original problem is to make a route that throws from serialize:

export default class FooRoute extends Route {
  serialize() {
    throw new Error('boom');
  }
}

Before this change, you would see:

Screen Shot 2021-01-18 at 1 45 14 PM

Notice that both the message and the stack trace are misleading.

After this change, you would see:

Screen Shot 2021-01-18 at 1 45 31 PM

In which the message is not so misleading anymore, and the stack trace points to the real site of the problem.

I also confirmed that this still gives reasonable results for the case of failing to pass enough dynamic parameters. Before:

Screen Shot 2021-01-18 at 1 44 30 PM

And after:

Screen Shot 2021-01-18 at 1 44 49 PM

@rwjblue rwjblue changed the title Fix misleading LinkTo error message [BUGFIX beta] Fix misleading LinkTo error message Jan 18, 2021
@rwjblue rwjblue changed the title [BUGFIX beta] Fix misleading LinkTo error message [BUGFIX release] Fix misleading LinkTo error message Jan 18, 2021
@rwjblue rwjblue merged commit 20647ee into master Jan 18, 2021
@rwjblue rwjblue deleted the link-to-error branch January 18, 2021 21:55
@rwjblue
Copy link
Member

rwjblue commented Jan 18, 2021

Nice! Thank you!

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.

Misleading error on 3.15 migration
2 participants