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

Crash on fetch() Response inspect #10294

Closed
AaronO opened this issue Apr 21, 2021 · 0 comments · Fixed by #10295
Closed

Crash on fetch() Response inspect #10294

AaronO opened this issue Apr 21, 2021 · 0 comments · Fixed by #10295

Comments

@AaronO
Copy link
Contributor

AaronO commented Apr 21, 2021

Deno v1.9.1 crashes when inspecting fetch responses, this appears to be a regression introduced by #10203

Reproducible example

deno upgrade --version 1.9.0 &>/dev/null; deno -V; deno eval 'console.log(await fetch("https://api.ipify.org/"))' ;\
echo "\n" ;\
deno upgrade --version 1.9.1 &>/dev/null; deno -V; deno eval 'console.log(await fetch("https://api.ipify.org/"))'

Outputs:

deno 1.9.0
Response {
  url: "https://api.ipify.org/",
  statusText: "OK",
  status: 200,
  headers: Headers { server: Cowboy, connection: keep-alive, content-type: text/plain, vary: Origin, date: Wed, 21 Apr 2021 19:38:40 GMT, content-length: 12, via: 1.1 vegur },
  redirected: false,
  type: "default"
}


deno 1.9.1
error: Uncaught (in promise) TypeError: this.url is not a function
console.log(await fetch("https://api.ipify.org/"))
        ^
    at Response.[Deno.customInspect] (deno:op_crates/fetch/23_response.js:360:19)
    at inspectObject (deno:op_crates/console/02_console.js:925:50)
    at inspectValue (deno:op_crates/console/02_console.js:481:16)
    at inspectArgs (deno:op_crates/console/02_console.js:1454:19)
    at console.log (deno:op_crates/console/02_console.js:1504:9)
    at file:///Users/aaron/git/deno/$deno$eval.ts:1:9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant