Hi
Please describe your error in detail.
Do you want to hide this type of error in the frontend?
No, it can’t be hidden. The solution is not to hide it but to fix it.
Errors like this are logged. Check the error log on your server. If you can’t find the log, please contact your host.
Meantime, enable wp_debug and wp_debug_log and after an error, look at wp-content/debug.log to see if anything gets logged there. https://ww.wp.xz.cn/support/article/debugging-in-wordpress/
You can also try this: Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.
If you cannot access wp-admin, there are other ways to deactivate plugins: https://ww.wp.xz.cn/support/article/faq-troubleshooting/#how-to-deactivate-all-plugins-when-not-able-to-access-the-administrative-menus
Just log in to the hosting dashboard, then go to Sites > Tools > WordPress debugging and click Enable. You can then look around your site to find the cause of the issue or check the log. Make sure to disable debugging when you’re done, as it’s visible to your visitors as well as you.