koala73/worldmonitor · error · Error
Sentry returned no resolved issues for ${org}/${project}. A
Error message
Sentry returned no resolved issues for ${org}/${project}. A project with history always has some, so this is a misread rather than a clean board: check SENTRY_ORG and SENTRY_PROJECT, and that the token can see this project. Reporting it clean would be the silent pass this audit exists to prevent. What it means
assertLiveBoardIsNotEmpty guards against a false 'clean' audit result. A Sentry project with history always has at least some resolved issues, so an empty result means the query misread — wrong org/project env vars or a token that cannot see the project — not that nothing violates the pins. Reporting that as clean would be exactly the silent pass this audit exists to prevent, so it throws.
Solutions
- Verify SENTRY_ORG and SENTRY_PROJECT match the real Sentry slugs (check the project URL in the Sentry UI).
- Confirm the auth token has read access to the target project; generate a fresh token if scopes changed.
- Query the Sentry API manually (curl with the same token and slug) to check whether resolved issues actually exist.
- If the project is genuinely new with no resolved issues, audit a project with history rather than bypassing the assertion.
Example fix
// before const issues = await fetchResolvedIssues(token, org, project); // after const issues = await fetchResolvedIssues(token, org, project); assertLiveBoardIsNotEmpty(issues, org, project); // throws with remediation hints if empty
Defensive patterns
Strategy: validation
Validate before calling
if (!Array.isArray(issues) || issues.length === 0) {
throw new Error(`No resolved issues for ${org}/${project}; verify SENTRY_ORG, SENTRY_PROJECT, and token scope.`);
} Type guard
const hasResolvedIssues = (v) => Array.isArray(v) && v.length > 0;
Try / catch
try {
assertLiveBoardIsNotEmpty(issues, org, project);
} catch (err) {
console.error(err.message); // includes org/project and remediation hints
process.exitCode = 1;
} Prevention
- Pin SENTRY_ORG and SENTRY_PROJECT in one place and verify slugs against the Sentry UI URL.
- Smoke-test the token's project access before the audit runs.
- Treat an empty resolved-issue list as a misread, never as success.
- Audit a project with known history to keep the check meaningful.
When it happens
Trigger: Calling assertLiveBoardIsNotEmpty with an empty array (or a non-array such as null/undefined) of issues for a given org/project — i.e. the Sentry query succeeded but returned zero rows, or returned nothing at all.
Common situations: SENTRY_ORG or SENTRY_PROJECT is mistyped so the query matches an empty or different project; the auth token lacks scope for the intended project and the API returns an empty list instead of an error; env vars point at a different Sentry instance than intended.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Expected an array of Sentry issues. A Sentry error body is a
- Sentry pagination cursor left ${SENTRY_HOST}: ${new URL(next
- Sentry returned 403 for the issues endpoint. A release-scope
- Sentry issues request failed: HTTP ${response.status} ${resp
- Sentry issues response was not an array
AI-assisted analysis of koala73/worldmonitor@7d06c8633d (2026-09-15).
Data as JSON: /api/errors/b11eaf67d05d6f9e.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/audit-sentry-resolve-pins.mjs:182
return lines.join('\n');
}
export function formatRepairRecipe() {
return [
'Only repair a confirmed incompatible pin; preserve valid automatic resolutions.',
'Check deployed release identity and recurrence evidence before changing status.',
' 1. PUT status=unresolved on the issue.',
' 2. GET the issue and confirm status is unresolved.',
' 3. PUT status=resolved with no statusDetails.',
' 4. GET the issue and confirm statusDetails has no release or commit pin keys.',
'Step 1 is not optional. A resolved-to-resolved write silently no-ops and',
'leaves the pin in place while reporting success.',
].join('\n');
}
export function assertLiveBoardIsNotEmpty(issues, org, project) {
if (Array.isArray(issues) && issues.length > 0) return;
throw new Error(
`Sentry returned no resolved issues for ${org}/${project}. A project with history always `
+ 'has some, so this is a misread rather than a clean board: check SENTRY_ORG and '
+ 'SENTRY_PROJECT, and that the token can see this project. Reporting it clean would be '
+ 'the silent pass this audit exists to prevent.',
);
}
export function parseArguments(argv) {
const { values } = parseNodeArgs({
args: argv,
options: {
input: { type: 'string' },
},
allowPositionals: false,
strict: true,
});
return values;
}View on GitHub (pinned to 7d06c8633d)