Problematic logout doesn't show errors in the UI
I run remark42 like that: ./remark42.darwin-arm64 server --secret=12345 --url=http://127.0.0.1:8080.
If I was logged in before running that version (with no auth providers) I see a normal comment screen:
If I push the "log out" button, http://127.0.0.1:8080/auth/logout?site=remark request is made with status code 400 which has the following answer:
{
"error": "providers not defined"
}
The interface shows nothing. In the console, I see the following:
Erroring code:
I think it could be composed with https://github.com/umputun/remark42/issues/1456 the point is the same. we do not support 0 auth providers.
The scenario I described is the most straightforward way of producing the problem. The real issue is the lack of proper error handling on the logout button push in the frontend.
Maybe it is not only about logout btw, but handling errors on requests to server in general. I know we handle most of errors but probably we have several cases where we don't.
The specific of logout made me think of this bizarre case, because severity of described case is going to 0%.