src/vs/workbench/services/search/common/search.ts/serializeSearchError
export function serializeSearchError(searchError: SearchError): Error {
	const details = { message: searchError.message, code: searchError.code };
	return new Error(JSON.stringify(details));
}