umputun / remark42

comment engine
https://remark42.com
MIT License
4.81k stars 374 forks source link

Lack of frontend information about relative URL #1673

Closed paskal closed 10 months ago

paskal commented 11 months ago

Previewing a comment with the relative URL:

image

The answer from the backend is 400:

{
    "code": 4,
    "details": "invalid comment",
    "error": "links should start with mailto:, http:// or https://"
}

Submitting a comment with the relative URL:

image

The answer from the backend is 400 and the same text as above.

We need to alter the frontend to show the problem to the user instead of showing generic error messages, which do not help determine what went wrong and on which side. The preview answer for an unknown 400 error should be as well altered to Invalid comment data. so that the user would know something is off with the comment and not the Remark42 server.

thevinitgupta commented 11 months ago

Is it open? I would love to work on this.

paskal commented 11 months ago

Yes, feel free to pick it up.

thevinitgupta commented 11 months ago

When I am testing the above, I am getting the same text displayed as the second image. So is the issue solved??