{"record":{"id":"04d4363cf216c94a","repo":"tinyhumansai/openhuman","slug":"sentry-flush-2000-timed-out-event-may-not-have","errorCode":null,"errorMessage":"Sentry.flush(2000) timed out — event may not have reached Sentry. Check network / DSN / Sentry status before retrying.","messagePattern":"Sentry\\.flush\\(2000\\) timed out — event may not have reached Sentry\\. Check network / DSN / Sentry status before retrying\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/services/analytics.ts","lineNumber":583,"sourceCode":"  // event but doesn't influence the fingerprint.\n  const stamp = new Date().toISOString();\n  const error = new Error('Manual Sentry test from staging UI');\n  error.name = 'SentryStagingTestError';\n\n  const eventId = Sentry.captureException(error, {\n    tags: { test: 'manual-staging', source: 'developer-options-button' },\n    extra: { triggered_at: stamp },\n    level: 'error',\n  });\n\n  console.info('[sentry-test] captureException eventId=', eventId);\n  // Surface flush timeouts as failures: a `false` here means the event\n  // queue did not drain within 2s, so the network round-trip to Sentry is\n  // unconfirmed. For a *diagnostic* tool, returning a successful-looking\n  // eventId in that case would be a lie.\n  const flushed = await Sentry.flush(2000);\n  if (!flushed) {\n    throw new Error(\n      'Sentry.flush(2000) timed out — event may not have reached Sentry. ' +\n        'Check network / DSN / Sentry status before retrying.'\n    );\n  }\n  return eventId;\n}\n","sourceCodeStart":565,"sourceCodeEnd":590,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/app/src/services/analytics.ts#L565-L590","documentation":"Argument-loop error from `parse_tick_flags` (the `openhuman subconscious tick` parser). Only `--workspace/-w`, `--mode/-m` (each consuming a value) and `--verbose/-v` are accepted; every other token aborts. Notably there is NO -h/--help arm inside this loop — help is recognized only at the top level — so `openhuman subconscious tick -h` also produces this error.","triggerScenarios":"`openhuman subconscious tick -h` (use `openhuman subconscious --help` instead); `tick --dry-run`; `tick --workspace=/path` (the parser does not support `=`-syntax, so the whole token is unknown); `tick extra` positional.","commonSituations":"Reaching for -h at the subcommand level; `--flag=value` habit; leftover tokens in automation; assuming flags from `status` apply to `tick`.","solutions":["Use only -w/--workspace, -m/--mode, -v/--verbose, each with a space-separated value","Get help at the top level: `openhuman subconscious --help`","Write `--workspace /path`, never `--workspace=/path`"],"exampleFix":"# before\nopenhuman subconscious tick --mode=aggressive -h\n# after\nopenhuman subconscious --help   # then:\nopenhuman subconscious tick --mode aggressive -v","handlingStrategy":"validation","validationCode":"# bash: tick accepts only -w/--workspace <v>, -m/--mode <v>, -v — and no '=' syntax\nprev=''\nfor a in \"$@\"; do\n  case \"$a\" in\n    --workspace|-w|--mode|-m|--verbose|-v) ;;\n    --*) echo \"unknown flag '$a' (no '=' support; use space-separated values)\" >&2; exit 2 ;;\n    *) [ -n \"$prev\" ] || { echo \"unknown flag '$a'\" >&2; exit 2; } ;;\n  esac\n  prev=\"$a\"\ndone\nopenhuman subconscious tick \"$@\"","typeGuard":"is_tick_flag() { case \"$1\" in --workspace|-w|--mode|-m|--verbose|-v) return 0;; *) return 1;; esac; }","tryCatchPattern":"if ! out=$(openhuman subconscious tick \"$@\" 2>&1); then\n  case \"$out\" in *\"unknown flag\"*) echo \"allowed: --workspace <p> | --mode <m> | -v; help is top-level only\" >&2; openhuman subconscious --help >&2; exit 2;; esac\n  printf '%s\\n' \"$out\" >&2; exit 1\nfi","preventionTips":["Remember there is no -h inside tick — help lives at `openhuman subconscious --help`","Use space-separated values; the parser rejects --flag=value tokens as unknown flags"],"tags":["cli","usage","argument-parsing","subconscious"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}