moonfire-nvr/server/db
Scott Lamb 6a5b751bd6 log error messages in web paths
HTTP requests were only returning the error message to the caller, not
logging locally. In most cases the problem could be understood
client-side, but there are some exceptions. E.g. if Moonfire returns
a 403 on WebSocket update, even in the Chrome debug tools's network
tab the HTTP response body seems to be unavailable. And in general,
it's nice to have more context server-side.

Logging a `response::Body` isn't practical (it could be a stream), so
convert all the web stuff to use `base::Error` err returns.

Convert the `METHOD_NOT_ALLOWED` paths to return `Ok` for now. This is a
bit lame but punts on having some way of plumbing an explicit/overridden
status code in `base::Error`, as no gRPC error kind cleanly maps to
that.

Also convert `db::auth`, rather than making up an error kind in the web
layer.

This is also a small step toward getting rid of `failure::Error`.
2023-07-09 10:15:56 -07:00
..
dir switch from `log` to `tracing` 2023-07-04 16:51:22 -07:00
proto config file reference and doc reorganization 2023-01-06 14:25:13 -06:00
testdata restructure into "server" and "ui" subdirs 2021-01-22 22:01:17 -08:00
upgrade switch from `log` to `tracing` 2023-07-04 16:51:22 -07:00
Cargo.toml prep 0.7.6 release 2023-07-08 10:22:04 -07:00
auth.rs log error messages in web paths 2023-07-09 10:15:56 -07:00
build.rs clean up some clippy warnings 2023-01-28 11:59:21 -08:00
check.rs switch from `log` to `tracing` 2023-07-04 16:51:22 -07:00
coding.rs cargo clippy --fix 2023-01-29 15:01:19 -08:00
compare.rs cargo clippy --fix 2023-01-29 15:01:19 -08:00
days.rs switch from `log` to `tracing` 2023-07-04 16:51:22 -07:00
db.rs log error messages in web paths 2023-07-09 10:15:56 -07:00
fs.rs various doc improvements 2021-04-10 17:34:52 -07:00
json.rs clean up the easy clippy errors 2022-09-28 09:29:16 -07:00
lib.rs introduce /etc/moonfire-nvr.json (#133) 2022-03-09 13:18:33 -08:00
raw.rs cargo clippy --fix 2023-01-29 15:01:19 -08:00
recording.rs switch from `log` to `tracing` 2023-07-04 16:51:22 -07:00
schema.sql switch from libpasta to just scrypt 2021-10-27 11:50:55 -07:00
signal.rs switch from `log` to `tracing` 2023-07-04 16:51:22 -07:00
testutil.rs test and fix #282 2023-07-04 20:53:53 -07:00
writer.rs switch from `log` to `tracing` 2023-07-04 16:51:22 -07:00