jabyrd3 / typeto.me2

Successor to typeto.me
8 stars 3 forks source link

handle error on startup #6

Closed dmd closed 7 months ago

dmd commented 7 months ago
$ bin/type
Listening on http://localhost:8089/
e NotFound: No such file or directory (os error 2): readfile './rooms.json'
    at Object.readFileSync (ext:deno_fs/30_fs.js:757:10)
    at new Rooms (file:///app/index.ts:134:25)
    at file:///app/index.ts:200:15 {
  name: "NotFound",
  code: "ENOENT"
}
Listening on http://localhost:8090/

I assume that's benign, but if so, should be handled.

jabyrd3 commented 7 months ago

yeah, it's wrapped in a try/catch block already on l129 of server/index.ts, i was just logging the error for dev. will trim the error so it looks less spooky

jabyrd3 commented 7 months ago

commit 3329 fixes