Skip to content
New issue

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

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

Already on GitHub? # to your account

Response.error() panics #14371

Closed
luminr opened this issue Apr 23, 2022 · 1 comment · Fixed by #25712
Closed

Response.error() panics #14371

luminr opened this issue Apr 23, 2022 · 1 comment · Fixed by #25712
Labels
bug Something isn't working correctly ext/http related to ext/http

Comments

@luminr
Copy link

luminr commented Apr 23, 2022

Hi. The following code panics when the handler is called.

import { serve } from "https://deno.land/std@0.136.0/http/server.ts";
serve(() => Response.error());
Platform: macos aarch64
Version: 1.20.6
Args: ["deno", "run", "--allow-net", "--allow-env", "test.ts"]

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ext/http/lib.rs:504:25
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: deno_http::op_http_write_headers::call::{{closure}}
   4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   5: <extern "C" fn(A0) .> R as v8::support::CFnFrom<F>>::mapping::c_fn
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@bartlomieju bartlomieju added bug Something isn't working correctly ext/http related to ext/http labels Apr 23, 2022
@kartonrad
Copy link

this is a silly one, i ran into it to
it doesnt really do too much harm i guess

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working correctly ext/http related to ext/http
Projects
None yet
3 participants