import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey' ; export const isWriteBlockException = ( { type , reason } ) : boolean => { return ( type === 'cluster_block_exception' && reason . match ( /index \[.+] blocked by: \[FORBIDDEN\/8\/.+ \(api\)\]/ ) !== null ) ; } ; export const isIncompatibleMappingException = ( { type } ) : boolean => { return type === 'strict_dynamic_mapping_exception' || type === 'mapper_parsing_exception' ; } ; export const isIndexNotFoundException = ( { type } ) : boolean => { return type === 'index_not_found_exception' ; } ;