0

Does anyone have any idea how to hide error codes on the website (frontend) if any get and instead show the client a general graphic, e.g. that we have a temporary problem, we are working on it,

2
  • redirect to 404 page when error occur !! Commented Jun 13, 2021 at 17:19
  • Doesn't that already happen in production mode? You just need to set a custom error page
    – Jay Ghosh
    Commented Jun 14, 2021 at 6:59

2 Answers 2

1

Addition on the tips below: make sure the following line is commented:

ini_set('display_errors', 1);

to

#ini_set('display_errors', 1);

in app/bootstrap.php

Also what is said above: setting your site in production mode should disable the display of (most) errors.

0

You need to do following things.

  1. Set your website into the production mode using this command.

php bin/magento deploy:mode:set production

  1. If you want your custom design, then modify the default 404 page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.