Started using @tryghost/errors types#28644
Conversation
towards https://linear.app/ghost/issue/NY-1340 `@tryghost/errors` has types. Let's use them. I think this change is useful on its own, but it's also useful for an upcoming change which uses these types.
WalkthroughThe ambient TypeScript module declaration Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@tryghost/errors types@tryghost/errors types
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:e2e:no-coverage |
❌ Failed | 28s | View ↗ |
nx run-many -t lint -p ghost |
❌ Failed | 43s | View ↗ |
nx run ghost:build:tsc |
❌ Failed | 5s | View ↗ |
nx run-many --target=build --projects=@tryghost... |
✅ Succeeded | <1s | View ↗ |
💡 Dealing with memory or CPU issues? See memory and CPU details with the resource usage add-on ↗.
☁️ Nx Cloud last updated this comment at 2026-06-16 21:14:22 UTC
Pull request was converted to draft
towards https://linear.app/ghost/issue/NY-1340 ref #28644 This change should have no user impact. `RedirectsService` had a few type errors: - A number of errors weren't necessarily `Error`s. I added a function, `errify` to convert `unknown` to `Error`. (I think this function will be useful elsewhere.) - A `ValidationError` was being created with an invalid `context`. I think these are useful improvements on their own, but it'll also unblock [an upcoming change][0] in a seemingly-unrelated area. [0]: #28644
towards https://linear.app/ghost/issue/NY-1340 ref #28644 This change should have no user impact. `RedirectsService` had a few type errors: - A number of errors weren't necessarily `Error`s. I added a function, `errify` to convert `unknown` to `Error`. (I think this function will be useful elsewhere.) - A `ValidationError` was being created with an invalid `context`. I think these are useful improvements on their own, but it'll also unblock [an upcoming change][0] in a seemingly-unrelated area. [0]: #28644
towards https://linear.app/ghost/issue/NY-1340 ref #28644 This change should have no user impact. `RedirectsService` had a few type errors: - A number of errors weren't necessarily `Error`s. I added a function, `errify` to convert `unknown` to `Error`. (I think this function will be useful elsewhere.) - A `ValidationError` was being created with an invalid `context`. I think these are useful improvements on their own, but it'll also unblock [an upcoming change][0] in a seemingly-unrelated area. [0]: #28644

towards https://linear.app/ghost/issue/NY-1340
Depends on #28648.
@tryghost/errorshas types. Let's use them.I think this change is useful on its own, but it's also useful for an upcoming change which uses these types.