Hacker News new | ask | show | jobs
by romshark 8 days ago
> For example, if a post was just removed, it's better to show "Failed to like: the post no longer exists"

Why does your UI provide a like button for a removed post in the first place?

I mean, I get it, it could be a stale view you're interacting with; and yes, your error message is better than a generic one. But that doesn't mean you're exposing all error details to the user, you're just providing better error responses.

I guess the misunderstanding is coming from the "actual error" not being clearly defined.

P.S. The stale view can be solved by having live updating pages using SSE like the CQRS architecture that https://data-star.dev promotes. But if you're dealing with eventual consistency on a big scale then yes, it might not be solvable and better error messages is the best you can do.