Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Property 'status' does not exist on type 'FetchResponse<any> & FetchResponse<"json">'.ts(2339) #212

Closed
treboryx opened this issue Feb 18, 2023 · 2 comments

Comments

@treboryx
Copy link

Environment

Development

Reproduction

Simply use the example given in the readme for onResponseError

Describe the bug

image

Additional context

No response

Logs

No response

@Hebilicious
Copy link
Member

This is working fine for me :

  const r = await $fetch<string>("http://httpstat.us/500", {
    onResponseError({ request, response, options }) {
      // Log error
      console.log(
        "[fetch response error]",
        request,
        response.status,
        response.body
      );
    },
  });
image

@pi0 pi0 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2023
@khawarizmus
Copy link

khawarizmus commented Nov 1, 2023

@pi0 I have similar issue in addition to #314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants