UNPKG

@glue42/search-api

Version:

Glue42 Search API

9 lines (8 loc) 299 B
/* eslint-disable @typescript-eslint/no-explicit-any */ export const extractErrorMsg = (error: any): string => { const stringError = typeof error === "string" ? error : error.message ? JSON.stringify(error.message) : JSON.stringify(error); return stringError; };