mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-25 22:55:55 -05:00
6a5b751bd6
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`. |
||
---|---|---|
.. | ||
Cargo.toml | ||
clock.rs | ||
error.rs | ||
lib.rs | ||
shutdown.rs | ||
strutil.rs | ||
time.rs | ||
tracing_setup.rs |