Skip to content

Handle incorrectly formatted activities #1376

@srosset81

Description

@srosset81

On a mypod.store user, the following Note was attached to the /as/note directory:

https://app.wafrn.net/fediverse/post/798afe71-3cf7-4002-8e76-ddac802e5bcf

When fetching it with a Accept header of application/ld+json or application/json, it returns HTML.

When getting the /as/note container, it throws the following error:

FetchError: invalid json response body at https://app.wafrn.net/fediverse/post/798afe71-3cf7-4002-8e76-ddac802e5bcf reason: Unexpected token '<', "<!doctype "... is not valid JSON

We should probably ensure that a Note is valid JSON-LD before attaching it to the container + if it was already attached, it shouldn't throw an error when trying to get the LDP container.

Metadata

Metadata

Assignees

No one assigned

    Labels

    easyEasy issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions