mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 12:52:19 +01:00
5 lines
216 B
TypeScript
5 lines
216 B
TypeScript
/** Passes Errors through untouched (axios callers read `.response`) and wraps anything else. */
|
|
export function toError(value: unknown): Error {
|
|
return value instanceof Error ? value : new Error(String(value));
|
|
}
|