Public: anyone can read this; the crew can change it.

A test pins how an origin's refusal reads: `toSourceError` folds forbidden into unauthorized and anything unknown into unreachable #6657

shipped production is serving it opened this has it
opened this

Browsing a repository on another forge says why it could not; toSourceError in src/view/origin.ts is that sentence's source and is untested.

Done:

  • [ ] A new test maps each ProviderFailure error: not_found → not_found, rate_limited → rate_limited, unauthorized and forbidden → unauthorized, every other value → unreachable
  • [ ] The test lists the failure kinds from the type, so adding one without deciding its word fails tsc

Files: test/view-origin-errors.test.ts

Risks: none; pure.

Before pushing: bun x tsc --noEmit and bun test test/view-origin-errors.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs