prevent double stack trace 'fixes'#5644
Conversation
🦋 Changeset detectedLatest commit: 1813041 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| if (error) { | ||
| const stack = error?.stack; | ||
|
|
||
| if (__SVELTEKIT_DEV__ && error) { |
There was a problem hiding this comment.
I'm not sure we should include the __SVELTEKIT_DEV__. E.g. at my last company we would show you the stacktrace if you were logged in as an employee. We wouldn't show it to customers, but it was helpful for engineers to have access to it
There was a problem hiding this comment.
They do have access to it, in handleError. If we wanted to expose it more broadly than that then we can, but that's a much larger conversation than this change
There was a problem hiding this comment.
yeah, but it's harder to get at on a production machine vs having it just show up on the screen. I don't know that we should place restrictions on what people are allowed to do
There was a problem hiding this comment.
Sure — it's a conversation worth having, but it needs to be had separately. We currently prevent stack traces from appearing in production (at one point we didn't, but we were called out for bad security practices). This PR doesn't change that and I don't think this bugfix should get bogged down in that discussion, so let's figure it out elsewhere
There was a problem hiding this comment.
ah, I didn't realize we were doing that. this looked like new behavior
|
alright, whatever gremlins were in the system appear to have left us alone. think this is ready |
please god let this be the last one of these. closes #3371
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. All changesets should bepatchuntil SvelteKit 1.0