Hi @Yagnesh,
I have initiated two pull requests aimed at displaying an authentication error message when the xblock is not publicly accessible. I believe these enhancements will be beneficial.
Please feel free to review and make any changes to the following pull requests: