]> Untitled Git - lemmy.git/commit
Don't drop error context when adding a message to errors (#1958)
authorRiley <asonix@asonix.dog>
Mon, 6 Dec 2021 14:54:47 +0000 (08:54 -0600)
committerGitHub <noreply@github.com>
Mon, 6 Dec 2021 14:54:47 +0000 (09:54 -0500)
commit35cbae61bc03a1a0af29f79ee55223d4e9766c07
tree67cd923a3df1d02deb7d4595486b538cea2f0ca1
parent4a541a25ab272da7611a136b407ed7b165953552
Don't drop error context when adding a message to errors (#1958)

* Respond directly with LemmyError

Instrument Perform implementations for more precise traces
Use ApiError to format JSON errors when messages are present
Keep SpanTrace output in LemmyError Display impl

* Hide SpanTrace debug output from LemmyError

* Don't log when entering spans, only when leaving

* Update actix-web

* Update actix-rt

* Add newline after error info in LemmyError Display impl

* Propogate span information to blocking operations

* Instrument apub functions

* Use skip_all for more instrument attributes, don't skip 'self' in some api actions

* Make message a static string

* Send proper JSON over websocket

* Add 'message' to LemmyError display if present

* Use a quieter root span builder, don't pretty-print logs

* Keep passwords and emails out of logs

* Re-enable logging Login

* Instrument feeds

* Emit our own errors

* Move error log after status code recording

* Make Sensitive generic over the inner type

* Remove line that logged secrets
101 files changed:
Cargo.lock
Cargo.toml
crates/api/Cargo.toml
crates/api/src/comment.rs
crates/api/src/comment_report.rs
crates/api/src/community.rs
crates/api/src/local_user.rs
crates/api/src/post.rs
crates/api/src/post_report.rs
crates/api/src/private_message.rs
crates/api/src/site.rs
crates/api/src/websocket.rs
crates/api_common/Cargo.toml
crates/api_common/src/comment.rs
crates/api_common/src/community.rs
crates/api_common/src/lib.rs
crates/api_common/src/person.rs
crates/api_common/src/post.rs
crates/api_common/src/site.rs
crates/api_common/src/websocket.rs
crates/api_crud/src/comment/create.rs
crates/api_crud/src/comment/delete.rs
crates/api_crud/src/comment/read.rs
crates/api_crud/src/comment/update.rs
crates/api_crud/src/community/create.rs
crates/api_crud/src/community/delete.rs
crates/api_crud/src/community/read.rs
crates/api_crud/src/community/update.rs
crates/api_crud/src/post/create.rs
crates/api_crud/src/post/delete.rs
crates/api_crud/src/post/read.rs
crates/api_crud/src/post/update.rs
crates/api_crud/src/private_message/create.rs
crates/api_crud/src/private_message/delete.rs
crates/api_crud/src/private_message/read.rs
crates/api_crud/src/private_message/update.rs
crates/api_crud/src/site/create.rs
crates/api_crud/src/site/read.rs
crates/api_crud/src/site/update.rs
crates/api_crud/src/user/create.rs
crates/api_crud/src/user/delete.rs
crates/api_crud/src/user/read.rs
crates/apub/src/activities/comment/create_or_update.rs
crates/apub/src/activities/comment/mod.rs
crates/apub/src/activities/community/add_mod.rs
crates/apub/src/activities/community/announce.rs
crates/apub/src/activities/community/block_user.rs
crates/apub/src/activities/community/mod.rs
crates/apub/src/activities/community/remove_mod.rs
crates/apub/src/activities/community/report.rs
crates/apub/src/activities/community/undo_block_user.rs
crates/apub/src/activities/community/update.rs
crates/apub/src/activities/deletion/delete.rs
crates/apub/src/activities/deletion/mod.rs
crates/apub/src/activities/deletion/undo_delete.rs
crates/apub/src/activities/following/accept.rs
crates/apub/src/activities/following/follow.rs
crates/apub/src/activities/following/undo_follow.rs
crates/apub/src/activities/mod.rs
crates/apub/src/activities/post/create_or_update.rs
crates/apub/src/activities/private_message/create_or_update.rs
crates/apub/src/activities/private_message/delete.rs
crates/apub/src/activities/private_message/undo_delete.rs
crates/apub/src/activities/voting/mod.rs
crates/apub/src/activities/voting/undo_vote.rs
crates/apub/src/activities/voting/vote.rs
crates/apub/src/activity_lists.rs
crates/apub/src/collections/community_moderators.rs
crates/apub/src/collections/community_outbox.rs
crates/apub/src/fetcher/post_or_comment.rs
crates/apub/src/fetcher/search.rs
crates/apub/src/fetcher/user_or_community.rs
crates/apub/src/fetcher/webfinger.rs
crates/apub/src/http/comment.rs
crates/apub/src/http/community.rs
crates/apub/src/http/mod.rs
crates/apub/src/http/person.rs
crates/apub/src/http/post.rs
crates/apub/src/lib.rs
crates/apub/src/mentions.rs
crates/apub/src/objects/comment.rs
crates/apub/src/objects/community.rs
crates/apub/src/objects/person.rs
crates/apub/src/objects/post.rs
crates/apub/src/objects/private_message.rs
crates/apub/src/protocol/activities/voting/vote.rs
crates/apub/src/protocol/objects/page.rs
crates/db_schema/src/lib.rs
crates/routes/Cargo.toml
crates/routes/src/feeds.rs
crates/utils/src/lib.rs
crates/utils/src/rate_limit/rate_limiter.rs
crates/utils/src/sensitive.rs [new file with mode: 0644]
crates/utils/src/utils.rs
crates/websocket/src/chat_server.rs
crates/websocket/src/handlers.rs
crates/websocket/src/routes.rs
src/api_routes.rs
src/lib.rs
src/main.rs
src/root_span_builder.rs [new file with mode: 0644]