The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add logging for scopeid error (#8513)
Félix Malfaitbd18eb8b427f
diff --git a/.github/workflows/ci-utils.yaml b/.github/workflows/ci-utils.yamlindex 7a7ef38042d..352e40c8586 100644--- a/.github/workflows/ci-utils.yaml+++ b/.github/workflows/ci-utils.yaml@@ -15,7 +15,9 @@ permissions:statuses: writeconcurrency:group: ${{ github.workflow }}-${{ github.ref }}- cancel-in-progress: true+ # We don't cancel in-progress because this workflow is triggered on+ # pull_request_target, which means the ref can be the same accross two PRs.+ # cancel-in-progress: truejobs:danger-js:diff --git a/packages/twenty-front/src/modules/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId.ts b/packages/twenty-front/src/modules/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId.tsindex 6dd6b2ed5b9..02a902c0ec2 100644--- a/packages/twenty-front/src/modules/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId.ts+++ b/packages/twenty-front/src/modules/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId.ts@@ -17,6 +17,10 @@ export const useAvailableScopeIdOrThrow = <T extends { scopeId: string }>(} else if (isNonEmptyString(scopeIdFromContext)) {return scopeIdFromContext;} else {- throw new Error('Scope id is not provided and cannot be found in context.');+ throw new Error(+ `Scope id is not provided and cannot be found in context.\n` ++ `Context: ${Context.displayName || 'Unknown'}\n` ++ `ScopeInternalContext.scopeId: ${scopeInternalContext?.scopeId || 'Unknown'}`,+ );}};