lemmy-ui icon indicating copy to clipboard operation
lemmy-ui copied to clipboard

[Bug]: Lemmy backend should respond with a descriptive error message when title length is too long

Open mafik opened this issue 1 year ago • 2 comments

Requirements

  • [X] Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • [X] Did you check to see if this issue already exists?
  • [X] Is this only a single bug? Do not put multiple bugs in one issue.
  • [X] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

Here is a post describing by journey: https://lemmy.world/post/7154024

Steps to Reproduce

  1. Create a post with ~100 of ampersands
  2. Lemmy fails to create new post (the submit button spins forever) even though the title length is below 200 characters.

Technical Details

See https://lemmy.world/post/7154024

Version

BE 0.18.5

Lemmy Instance URL

lemmy.world

mafik avatar Oct 22 '23 08:10 mafik

So, Lemmy should validate post title length before it it the database.

varshard avatar Nov 22 '23 02:11 varshard

Lemmy backend returns an error message {"error":"couldnt_create_post"} in that case, but lemmy-ui doesnt handle it which results in infinite spin. Moving this to lemmy-ui repo.

Nutomic avatar Nov 22 '23 09:11 Nutomic