mirror of
				https://github.com/lingble/twenty.git
				synced 2025-10-31 12:47:58 +00:00 
			
		
		
		
	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:
		
							
								
								
									
										4
									
								
								.github/workflows/ci-utils.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/ci-utils.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -15,7 +15,9 @@ permissions: | ||||
|   statuses: write | ||||
| concurrency: | ||||
|   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: true | ||||
|  | ||||
| jobs: | ||||
|   danger-js: | ||||
|   | ||||
| @@ -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
	 Félix Malfait
					Félix Malfait