diff --git a/plugs/core/template.ts b/plugs/core/template.ts index 7f3f601..e0ef65a 100644 --- a/plugs/core/template.ts +++ b/plugs/core/template.ts @@ -130,8 +130,7 @@ export async function dailyNoteCommand() { }); let dailyNoteTemplateText = ""; try { - const text = await space.readPage(dailyNoteTemplate); - dailyNoteTemplateText = text; + dailyNoteTemplateText = await space.readPage(dailyNoteTemplate); } catch { console.warn(`No daily note template found at ${dailyNoteTemplate}`); } diff --git a/server/http_server.ts b/server/http_server.ts index 5b9ca65..43f0b2e 100644 --- a/server/http_server.ts +++ b/server/http_server.ts @@ -439,10 +439,10 @@ function buildFsRouter(spacePrimitives: SpacePrimitives): Router { response.headers.set("X-Last-Modified", "" + meta.lastModified); response.headers.set("X-Content-Length", "" + meta.size); response.headers.set("X-Permission", meta.perm); - } catch (err) { - response.status = 500; - response.body = "Options failed"; - console.error("Options failed", err); + } catch { + response.status = 404; + response.body = "File not found"; + // console.error("Options failed", err); } }) .delete("\/(.+)", async ({ response, params }) => {