server: provide readable error when a file requested by the client file is not found
This commit is contained in:
parent
8381ca7531
commit
4b250fc389
2 changed files with 10 additions and 5 deletions
|
|
@ -14,11 +14,12 @@ As of this version, packages except the `node` package are bundled with a midi b
|
|||
|
||||
|
||||
- bug fixes
|
||||
- missing context menu (copy, paste) in inspector inputs
|
||||
- osc listeners not resolving "auto" address
|
||||
- `ELECTRON_RUN_AS_NODE` headless mode not working without `--no-gui` option
|
||||
- editor: missing context menu (copy, paste) in inspector inputs
|
||||
- widgets: osc listeners not resolving "auto" address
|
||||
- cli: `ELECTRON_RUN_AS_NODE` headless mode not working without `--no-gui` option
|
||||
- ios: clone widget not laid out properly in horizontal panels
|
||||
- missing vertical scrollbar when root's height overflows the workspace
|
||||
- ui: missing vertical scrollbar when root's height overflows the workspace
|
||||
- server: provide readable error when a file requested by the client file is not found
|
||||
|
||||
- ui
|
||||
- add console bottom panel with a simple script interpreter
|
||||
|
|
|
|||
|
|
@ -99,7 +99,11 @@ function httpRoute(req, res) {
|
|||
res.sendFile(path.resolve(sessionPath + url))
|
||||
} catch(e) {
|
||||
// absolute resolution
|
||||
res.sendFile(path.resolve(url))
|
||||
try {
|
||||
res.sendFile(path.resolve(url))
|
||||
} catch(e) {
|
||||
console.error(`(ERROR, HTTP) File not found: ${url}`)
|
||||
}
|
||||
}
|
||||
} else if (url.includes('/osc-ping')) {
|
||||
httpCheck(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue