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

Add displayName to error page(s) #6026

Closed
isaachinman opened this issue Jan 10, 2019 · 5 comments · Fixed by #6029
Closed

Add displayName to error page(s) #6026

isaachinman opened this issue Jan 10, 2019 · 5 comments · Fixed by #6029

Comments

@isaachinman
Copy link
Contributor

Feature request

Is your feature request related to a problem? Please describe.

Recently in next-i18next, we implemented some console warnings to improve DX. If a page-level component does not return namespacesRequired in pageProps, we pass a warning and print that component's displayName to be helpful. This caused me to realise that the _error.js page does not have a displayName.

Describe the solution you'd like

Add a sensible displayName to the _error.js page so that tools built on top of NextJs can make sense of what it is.

I am happy to quickly submit a PR for this and hopefully see it merged and released ASAP! If there is good reason for _error.js to not have a displayName, please do let me know - I searched through the issues and found nothing.

@timneutkens
Copy link
Member

Sounds good to me 🤔

@isaachinman
Copy link
Contributor Author

@timneutkens Cool, any preference on what that should be?

@timneutkens
Copy link
Member

I guess Error or ErrorPage 🤔

@isaachinman
Copy link
Contributor Author

isaachinman commented Jan 10, 2019

@timneutkens Forgive me if I'm being naïve but is it as simple as #6029? There isn't any documentation on displayName, and surprisingly few examples to go on.

Also, I tried to run testonly locally and hundreds of not-headless Chromium apps were opened simultaneously and crashed my machine. Did I miss something, or would you take a PR for that, too?

The tests seem to be failing on CI but it looks like a registry thing.

@timneutkens
Copy link
Member

Looks fine to me!

timneutkens pushed a commit that referenced this issue Jan 10, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants