I’m inclined to say it happens to comments that are too long but I’m not sure it’s the only case where it happens. It seems the API simply returns a 400 error with “invalid_body_field” as the response. The web UI however just displays an infinite spinning wheel with no helpful error message.

  • WalterLatrans@yiffit.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    I had a peek at the source code and although I don’t actually know Rust it looks like that error comes from a check for character length in the function “is_valid_body_field”. Strangely it does the same check twice against two variables “POST_BODY_MAX_LENGTH” and “BODY_MAX_LENGTH”.

    The smaller of the two is BODY_MAX_LENGTH which is set at 10000, so I assume the max character limit is 10,000. There are no other checks in that function other than the character count and that’s the only place in the source code that the text “invalid_body_field” shows up so I assume it’s only sent as a response to too much text, but as I said I don’t actually know Rust so I could be wrong.