-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat(condo): DOMA-10226 add full stacked gql error traces #5243
base: main
Are you sure you want to change the base?
Conversation
…full trace to developer in case of jest error
Quality Gate passedIssues Measures |
* @param {Error} error -- any error | ||
* @param {Boolean} hideInternals -- do you need to hide some internal error fields | ||
* @param {Boolean} applyPatches -- do you need to apply a common error message patches | ||
* @returns {import('graphql').GraphQLFormattedError} | ||
*/ | ||
const safeFormatError = (error, hideInternals = false, applyPatches = true) => { | ||
const safeFormatError = (errorIn, hideInternals = false, applyPatches = true, _isRecursionCall = false) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s better to create another internal function with third argument.
@@ -138,7 +137,7 @@ function setAllFeatureFlags (value) { | |||
function setFakeClientMode (entryPoint, prepareKeystoneOptions = {}) { | |||
if (__expressApp !== null) return | |||
if (__isAwaiting) return | |||
console.warn('setFakeClientMode(): you changed the test execution mode to FAKE client! Your test will not really make a request to remote server! Use it only for local debugging or .spec.js tests cases') | |||
// console.warn('setFakeClientMode(): you changed the test execution mode to FAKE client! Your test will not really make a request to remote server! Use it only for local debugging or .spec.js tests cases') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like some local development stuff
Improve developer experience. And show what the real original error. And provide a full stack trace with internal and intermediate errors.