ardatan / feTS

🗹 TypeScript HTTP Framework focusing on e2e type-safety, easy setup, performance & great developer experience

Home Page:https://the-guild.dev/openapi/fets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Abort signal is not handled

wzulfikar opened this issue · comments

Describe the bug

The docs say that we can pass abort signal as second argument but looks like it's not being handled.

https://the-guild.dev/openapi/fets/client/request-params#request-cancellation

This means request cancellation doesn't actually work.

To Reproduce Steps to reproduce the behavior:

Something like:

const client = createClient<NormalizedOAS>({
  endpoint: 'https://postman-echo.com',
});

// This should throw because of timeout, but it didn't because the signal wasn't handled
client['/get'].get(undefined, { signal: AbortSignal.timeout(0) }))

Expected behavior

The signal should be handled

Environment:

  • OS:
  • package-name...:
  • NodeJS:

Additional context

I created a draft PR (#709) to illustrate the point with a test.

Thank you!