mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
7 lines
286 B
TypeScript
7 lines
286 B
TypeScript
import getErrorObj from './getErrorObj';
|
|
|
|
export default function getErrorMessage(error: Error | undefined): string | undefined {
|
|
const errorObj = getErrorObj(error);
|
|
return errorObj && 'message' in errorObj && typeof errorObj.message === 'string' ? errorObj.message : undefined;
|
|
}
|