Skip to content

501 errors on incoming delete activities #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
uvok opened this issue Mar 19, 2025 · 3 comments
Open

501 errors on incoming delete activities #92

uvok opened this issue Mar 19, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@uvok
Copy link
Contributor

uvok commented Mar 19, 2025

When a Delete activity is POSTed to the inbox of a hatsu server, it emits an error 501 with a body along the lines of

{"error":"Failed to parse incoming activity with id <blah>#delete: data did not match any variant of untagged enum UserInboxActivities at line 1 column 804","error_id":"0195ae77-0934-7ea2-851d-d77e61e3175e"}

The hatsu log says something along the lines of

Mar 19 13:01:13 x.uvok.de start.sh[1348]:   2025-03-19T13:01:13.444531Z  INFO tower_http::trace::on_response: finished processing request, latency: 1 ms, status: 500
Mar 19 13:01:13 x.uvok.de start.sh[1348]:     at /home/uvok/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tower-http-0.5.2/src/trace/on_response.rs:114
Mar 19 13:01:13 x.uvok.de start.sh[1348]:     in tower_http::trace::make_span::request with method: POST, uri: /users/blog.uvokchee.de/inbox, version: HTTP/1.0
Mar 19 13:01:13 x.uvok.de start.sh[1348]:   2025-03-19T13:01:13.444614Z ERROR tower_http::trace::on_failure: response failed, classification: Status code: 500 Internal Server Error, latency: 1 ms
Mar 19 13:01:13 x.uvok.de start.sh[1348]:     at /home/uvok/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tower-http-0.5.2/src/trace/on_failure.rs:93
Mar 19 13:01:13 x.uvok.de start.sh[1348]:     in tower_http::trace::make_span::request with method: POST, uri: /users/blog.uvokchee.de/inbox, version: HTTP/1.0

Is this intended? I don't think hatsu can actually handle the delete activity, but can it be "swallowed" or maybe replied with "operation not supported"?

I haven't been able to figure out how exactly hatsu, or rather, the activitypub_federation crate, maps the type of the JSON to a handler, I only found I have to start (or rather, finish) at crates/apub/src/activities/activity_lists.rs and probably "implement my way backwards" from there. Still, I'm completely clueless how the actual "mapping" works. It seems "serde" is involved in this.

@kwaa kwaa added the bug Something isn't working label Apr 3, 2025
@kwaa
Copy link
Member

kwaa commented Apr 3, 2025

Hatsu does not currently support Delete activities. Will it cause the process to crash? If not, you can safely ignore this error.

@kwaa
Copy link
Member

kwaa commented Apr 3, 2025

I haven't been able to figure out how exactly hatsu, or rather, the activitypub_federation crate, maps the type of the JSON to a handler, I only found I have to start (or rather, finish) at crates/apub/src/activities/activity_lists.rs and probably "implement my way backwards" from there. Still, I'm completely clueless how the actual "mapping" works. It seems "serde" is involved in this.

Yes, the imported struct in this file describes the corresponding JSON format.

@uvok
Copy link
Contributor Author

uvok commented Apr 5, 2025

Hatsu does not currently support Delete activities. Will it cause the process to crash? If not, you can safely ignore this error.

No, it doesn't. I was trying to figure out an unrelated problem (a reply to my AP status not being saved into in database for some reason) and was confused by the amount of 50x errors in the log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants