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

ErrorEvent is not defined #76

Closed
gjuoun opened this issue May 13, 2020 · 2 comments
Closed

ErrorEvent is not defined #76

gjuoun opened this issue May 13, 2020 · 2 comments

Comments

@gjuoun
Copy link

gjuoun commented May 13, 2020

Hello, I'm trying to use error handler, however I'm not able to use it

Can anyone help?

import { Application } from "https://deno.land/x/oak/mod.ts";

const app = new Application();

app.use((ctx) => {
  ctx.throw(500);// Uncaught ReferenceError: ErrorEvent is not defined
});

app.addEventListener("error", (evt) => {
  console.log(evt.error);
});

await app.listen({ port: 8000 });

Stdout:
image

@kitsonk
Copy link
Collaborator

kitsonk commented May 13, 2020

You need to use Deno 1.0.0-rc3 or later.

@gjuoun
Copy link
Author

gjuoun commented May 13, 2020

It works. updating to the latest(1.0.0-rc3) solve the problem.
Thanks!

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

No branches or pull requests

2 participants