fixed warnings from eslint
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Extracts a readable message from an unknown thrown value, since anything
|
||||
* (not just an Error) can be thrown and caught.
|
||||
*/
|
||||
export function getMsgFromError(err: unknown): string {
|
||||
return err instanceof Error ? err.message : String(err)
|
||||
}
|
||||
Reference in New Issue
Block a user