Ambiguous error message when loading topic that you don't have permission to read

When attempting to load a topic that I don’t have permission to read (either because my trust level is too low or because it’s a private message I’m not involved in), I get the following error message:

This message doesn’t tell me what actually went wrong (I didn’t have permission to view the topic).

I recently encountered this on what.thedailywtf.com when someone linked a topic in the Lounge category (which requires TL3+ to read) from a post in another category. I was only TL2 at the time, so I didn’t have permission to view it and got the above error message when I clicked on the link.

To reproduce this, I created two new accounts and sent a PM from one to the other. When attempting to view this PM on my main account, I got the above error. When attempting to view a topic in the Lounge (TL3+) on one of the test accounts (TL1), I got the same error.

8 Likes

Yeah this is a bug I also mentioned it to @eviltrout.

I believe @eviltrout already fixed it :wink:

https://github.com/discourse/discourse/commit/5890dae64c7af7ca0c93728a98e25f3bc1195ccc

4 Likes