You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to implement better error handling for our federation code. At the moment, most of it uses stringly typed errors, like Err(anyhow!("Activity is not addressed to public").into()). We should implement a separate error type instead, and make sure that returned status codes are in accordance with the activitypub standard.
Error codes are already correct as far as I see. As for the error messages, we could wrap them in an ApubError type, but in the end they are still going to be strings describing what went wrong, so I'm not sure if it would improve anything.
This doc really doesn't say anything about specific error messages, only that they return appropriate http error codes: https://www.w3.org/TR/activitypub/ . We're probably fine with string errors.
struct ApubError {
inner: Option<anyhow::Error>, // the cause, if any
apub_id: Url, // id of the object which caused the error (for debugging)
message: String, // human readable description of what happened
status_code: StatusCode, // if this error is served over http, use this as status code
}
We need to implement better error handling for our federation code. At the moment, most of it uses stringly typed errors, like
Err(anyhow!("Activity is not addressed to public").into())
. We should implement a separate error type instead, and make sure that returned status codes are in accordance with the activitypub standard.Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: