#6093 better error middleware

v1.0.0
closed
sf-1 (616)
General
Cory Johns
2015-08-20
2013-04-11
No

TurboGears standard error handler WebError doesn't work well with mod_wsgi processes. sfpy has custom error catching middleware and error template to display a trace in the web browser. We should use that in Allura also. And potentially enable the WebError or wdb in Allura when it's run with paster, since that's an even better debugger.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-04-19
    • Size: --> 1
     
  • Dave Brondsema

    Dave Brondsema - 2013-04-19
    • status: open --> in-progress
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2013-04-19

    Remove processes from WSGIDaemonProcess directive (can't even be set to 1).

    werkzeug

    Comment out our tg.error.ErrorHandler middleware and put app = DebuggedApplication(app, evalex=True, console_path='/nf/__console__') after StatusCodeRedirect. Works well, but less is logged to stderr logs (no env vars) and c.app/project/user don't work in interactive debugging.

    Still works with multiprocess, including limited interactive debugging (but doesn't work completely)

    weberror

    set debug=true in ini file

    Requires hacks to modify /_debug URL to be /nf/_debug which is needed for our sandbox environment. c.app/project/user does still work. SSLMiddleware interferes with ErrorHandler. Putting ErrorHandler after it works, but then we'd miss some errors.

     
  • Dave Brondsema

    Dave Brondsema - 2013-04-22
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2013-04-22

    I've forked WebError at https://github.com/brondsem/weberror to support /nf/_debug instead of /_debug but decided not to use that, since it's only needed for the SF sandbox environment and we can modify our routing.

     
  • Dave Brondsema

    Dave Brondsema - 2013-04-23

    sfpy:db/6093 - test with debug=false and ensure that /projects/ccaproj05/files/ shows a PFS error as flash message (that's the safe_message_from_exception functionality that we still keep around)

     
  • Cory Johns

    Cory Johns - 2013-04-23
    • QA: Cory Johns
     
  • Cory Johns

    Cory Johns - 2013-04-24
    • status: code-review --> closed
     

Log in to post a comment.