Closed nenadalm closed 5 years ago
Here is place that reads files: https://github.com/macchiato-framework/macchiato-core/blob/8660c2ffb3ce91dc16b0ebb6e9c56f9c2e36cd31/src/macchiato/server.cljs#L28
but in case of non existent files, it just proceeds silently (https://github.com/macchiato-framework/macchiato-fs/blob/1561f573de04d373aa3ae8b233b25f5f4abc1052/src/macchiato/fs.cljs#L27)
I noticed this on ci, where I've got message that server started, but curl wouldn't return status 200 when checking if started.
ci
200
Maybe slurp in macchiato-fs should return exception as it does in Clojure? Or macchiato-core should check if files exists?
slurp
macchiato-fs
Clojure
macchiato-core
Yeah, I think slurp throwing an exception would be the way to go. I'll try take a look soonish, but if you'd be up for doing a PR I can do a new release with it as well.
Here is place that reads files: https://github.com/macchiato-framework/macchiato-core/blob/8660c2ffb3ce91dc16b0ebb6e9c56f9c2e36cd31/src/macchiato/server.cljs#L28
but in case of non existent files, it just proceeds silently (https://github.com/macchiato-framework/macchiato-fs/blob/1561f573de04d373aa3ae8b233b25f5f4abc1052/src/macchiato/fs.cljs#L27)
I noticed this on
ci
, where I've got message that server started, but curl wouldn't return status200
when checking if started.Maybe
slurp
inmacchiato-fs
should return exception as it does inClojure
? Ormacchiato-core
should check if files exists?