mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-03-13 12:27:41 -04:00
8 lines
187 B
TypeScript
8 lines
187 B
TypeScript
export const parseError = (error?: unknown) => {
|
|
if (error && typeof error === "object" && "message" in error) {
|
|
return { message: error.message as string };
|
|
}
|
|
|
|
return undefined;
|
|
};
|