-
-
Notifications
You must be signed in to change notification settings - Fork 245
Open
Labels
bug π₯Something isn't workingSomething isn't workingclientClient package relatedClient package related
Description
Description
Hi,
I'm trying to add an AbortController signal to a GET
openapi endpoint. The function has been auto-generated with openapi-ts. It works fine when I'm trying to call it with a normal $fetch
, but doesn't with the generated method.
// Working code
const results = await $fetch(`/search`, {
method: 'GET',
signal: abortController.signal,
query: {
// Query params
},
})
// Not working code
const results = await searchSearchGet({
path: {
// Path params
},
signal: abortController.signal,
query: {
// Query params
},
composable: '$fetch',
})
The resulting error is:
myfile.vue:xxx FetchError: [GET] "https://xxxxx.xxx/search": <no response> Failed to execute 'fetch' on 'Window': Failed to read the 'signal' property from 'RequestInit': Failed to convert value to 'AbortSignal'.
Do you have any idea ?
Reproducible example or configuration
No response
OpenAPI specification (optional)
'@hey-api/nuxt':
specifier: 0.2.1
version: 0.2.1
'@hey-api/openapi-ts':
specifier: 0.83.1
version: 0.83.1
System information (optional)
No response
Metadata
Metadata
Assignees
Labels
bug π₯Something isn't workingSomething isn't workingclientClient package relatedClient package related