Patrik Oldsberg
b2319ffe45
errors: add toError utility and migrate assertError usages
...
Add a `toError` utility function to `@backstage/errors` that converts
unknown values to `ErrorLike` objects. If the value is already error-like
it is returned as-is. Strings are used directly as the error message, and
other values are stringified with a fallback to JSON.stringify to avoid
unhelpful `[object Object]` messages.
Non-error causes passed to `CustomErrorBase` are now converted and stored
using `toError` rather than discarded. Existing `assertError` call sites
across the codebase are migrated to `toError`.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com >
Made-with: Cursor
2026-04-03 10:16:23 +02:00
..
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-04-03 10:16:23 +02:00
2026-04-03 10:16:23 +02:00
2026-02-17 16:06:18 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-17 21:39:07 +00:00
2026-03-17 21:39:07 +00:00
2026-04-03 10:16:23 +02:00
2026-04-03 10:16:23 +02:00
2026-03-24 14:54:00 +00:00
2026-03-24 14:54:00 +00:00
2026-03-24 14:54:00 +00:00
2026-03-31 15:30:51 +00:00
2026-04-01 11:54:21 +02:00
2026-03-24 14:54:00 +00:00
2026-03-24 14:54:00 +00:00
2026-03-24 14:54:00 +00:00
2026-03-24 14:54:00 +00:00
2026-03-24 14:54:00 +00:00
2026-04-03 10:16:23 +02:00
2026-04-03 10:16:23 +02:00
2026-03-31 15:30:51 +00:00
2026-03-24 14:54:00 +00:00
2026-04-03 10:16:23 +02:00
2026-03-24 14:54:00 +00:00
2026-01-25 13:55:42 +01:00
2026-04-03 10:16:23 +02:00
2026-04-01 15:27:27 +02:00
2026-03-31 15:30:51 +00:00
2026-04-03 10:16:23 +02:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-24 14:54:00 +00:00
2026-02-17 16:06:18 +00:00
2026-04-03 10:16:23 +02:00
2026-03-31 15:30:51 +00:00
2026-03-17 21:39:07 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-03-30 21:59:27 +02:00
2026-03-10 15:29:30 +01:00
2026-03-24 14:54:00 +00:00
2026-03-17 21:39:07 +00:00
2026-04-03 10:16:23 +02:00
2026-03-31 15:30:51 +00:00
2026-03-24 14:54:00 +00:00
2026-03-31 15:30:51 +00:00
2026-03-31 15:30:51 +00:00
2026-02-23 06:29:04 -06:00
2026-03-31 15:30:51 +00:00
2026-02-17 16:06:18 +00:00
2026-03-24 14:54:00 +00:00