Comments (3)
You can use unhandledrejection
or error
events to catch these.
from deno.
got it working with onerror
. unhandledrejection
alone seems to do nothing.
// added to bottom of previous file
globalThis.addEventListener("unhandledrejection", (e) => {
console.log("unhandled rejection at:", e.promise, "reason:", e.reason);
e.preventDefault();
});
Running it behaves the same as before.
With onerror
it works:
globalThis.onerror = (e) => {
console.log("onerror:", e);
e.preventDefault();
};
Although no way to connect the error to a specific request, but definitely nice to be saved from the crash.
from deno.
I will close this for now as my question has been answered. Would be nice if there was something on the Deno.serve interface to handle this, feel free to re-open if that is desired and this is a worthwhile place to track that.
from deno.
Related Issues (20)
- Publishing JSR pkg that resolves to npm workspace member that's a JSR dep should error?
- deno compile: node addons gets error `missing symbol called`
- Compilation error during cargo install HOT 4
- `node:tty` -> N.WriteStream.prototype.hasColors is not a function
- File with just `+` does not report syntax error HOT 3
- Websocket behaviour change since 1.44.3 HOT 5
- No way to specify specific abstract socket name with `--allow-read/write`.
- Import error on startup when a Fresh project is a workspace member HOT 3
- Non-zero exit code in a test case causes the test to fail since 1.44.0 HOT 1
- `deno test --watch` should always print the full test output HOT 2
- proposal: add `Deno.ConfigFile` HOT 8
- βclient error (SendRequest)β when fetching certain https URLs over proxy HOT 14
- deno publish failed with error: error[excluded-module] when export casing differs from file casing HOT 5
- For loop does not works as expected HOT 2
- Deno APIs missing in Deno runtime HOT 1
- PermissionDenied (EACCES code) when trying to reading files from network-mapped drive
- ERR_MULTIPLE_CALLBACK is thrown during running `test` script in commander.js repo
- deno cache --vendor does not generate an import map HOT 1
- deno cache --vendor does not let me choose a folder name
- node WriteStream leaks in deno tests HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno.