Bug 856919 - Fix request.locale attribute error

Getting an AttributeError from request.locale on the 500
error handler path. Check for .locale before referencing it.
Merge pull request #791 from dpoirier/856919-no-locale-in-request

Bug 856919 - Fix request.locale attribute error