Skip to content
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

Add logging for scopeid error #8513

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci-utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'}`,
);
}
};
Loading