core icon indicating copy to clipboard operation
core copied to clipboard

ui: static pages and error handling

Open fichtner opened this issue 3 years ago • 0 comments

Important notices

Our forum is located at https://forum.opnsense.org , please consider joining discussions there in stead of using GitHub for these matters.

Before you ask a new question, we ask you kindly to acknowledge the following:

  • [x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
  • [x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

Remove debug mode since likely nobody will ever use it... Now that we only have production and development mode the differences are as such for static PHP pages:

  • Production: blank page with error is shown
  • Development: blank page without error is shown

The UI/API pages handle this more gracefully with 500 errors JSON return or simple redirect to crash reporter page where the logged error is visible. Something like this should also be used for static pages, especially since we use development mode to develop and browsing one more file or log elsewhere is always slower than before with 22.1.x (although the old system had other weaknesses and problem scope grew with PHP 8 migration in progress).

fichtner avatar Jul 19 '22 14:07 fichtner