Add logging for scopeid error (#8513)
Can't figure out https://github.com/twentyhq/twenty/issues/8347 so I'm adding logs, maybe it'll help debug in the future!
This commit is contained in:
@ -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'}`,
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user