A better Rust ATProto crate

log client errors with better context #4

merged
opened by nekomimi.pet targeting main

i needed to get better error logging for requests made as a generic client error from what i could tell is something i was unable to improve as a user of a library

im not sure about the custom display implementation, that code could be improved.

looks like this on a 429 × client error (see context for details): HTTP error 429 Too Many Requests ╰─▶ jacquard::agent::client

0
by nekomimi.pet 2 comments
expand 1 commit
7898b4c1
jacquard: log client errors better with info

theres also a lot of debug logging that seemingly got left in like

@@ -1081,8 +1081,6 @@ pub trait AgentSessionExt: AgentSession + IdentityResolver {
-            let debug: serde_json::Value = serde_json::from_slice(response.buffer()).unwrap();
-            println!("json: {}", serde_json::to_string_pretty(&debug).unwrap());

and

@@ -280,8 +280,6 @@ where
-                dbg!(&client_data);

which pollutes the terminal output

Yeah, good call. I'll merge this and then have a good once-over on the errors, there's a bunch of wording and so on i could improve.

pull request successfully merged
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:ttdrpj45ibqunmfhdsb4zdwq/sh.tangled.repo.pull/3m75c36ugwj22