File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11import type { FetchError , FetchOptions } from 'ofetch'
22import { stringify } from 'qs'
3+ import dns from 'dns'
34import type { Strapi4Error } from '../types/v4'
45import type { Strapi3Error } from '../types/v3'
56import { useStrapiUrl } from './useStrapiUrl'
67import { useStrapiVersion } from './useStrapiVersion'
78import { useStrapiToken } from './useStrapiToken'
89import { useNuxtApp } from '#imports'
910
11+ // Fixes `ECONNREFUSED` on Node 18: https://github.com/node-fetch/node-fetch/issues/1624#issuecomment-1407717012
12+ if ( process . server && process . dev ) {
13+ dns . setDefaultResultOrder ( 'ipv4first' )
14+ }
15+
1016const defaultErrors = ( err : FetchError ) => ( {
1117 v4 : {
1218 error : {
You can’t perform that action at this time.
0 commit comments