Closed Bug 885173 Opened 9 years ago Closed 8 years ago
balrog should return empty snippets instead of 500s
We did this for 404s, we should do it for 500s too. The trick here is making sure that we log enough information to the application log before we eat the error.
Product: mozilla.org → Release Engineering
mass component change
Component: General Automation → Balrog: Backend
This should be simple to implement. We should need to wrap the entirety of ClientRequestView.get (https://github.com/mozilla/balrog/blob/master/auslib/web/views/client.py#L32) in a try/except. In the except block we should make a call to log.exception() and then return an empty snippet. Might be good to factor out what an empty snippet looks like into the business logic.
mass priority change after component move
Priority: -- → P3
I started trying to implement this and got stuck trying to figure out a way to do it where we still get exceptions logged to Sentry. What I have is here: https://github.com/bhearsum/balrog/commit/6874e5a8325ff61db4476c43b8fc0c62a5766d12
(In reply to Ben Hearsum [:bhearsum] from comment #4) > I started trying to implement this and got stuck trying to figure out a way > to do it where we still get exceptions logged to Sentry. What I have is > here: > https://github.com/bhearsum/balrog/commit/ > 6874e5a8325ff61db4476c43b8fc0c62a5766d12 Looks like we can force it to send the exception: http://raven.readthedocs.org/en/latest/config/flask.html#usage But we need a place to put the Sentry middleware object. Right now it's only available in balrog.wsgi/admin.wsgi...
Turns out that Sentry supports lazy initialization, so we can just instantiate empty Sentry middleware in the library and initialize later. Hooray!
Assignee: nobody → bhearsum
Status: NEW → ASSIGNED
Attachment #8366888 - Flags: review?(nthomas)
Comment on attachment 8366888 [details] [diff] [review] send exceptions to sentry then nomnomnom Review of attachment 8366888 [details] [diff] [review]: ----------------------------------------------------------------- Very whizzybang! I crash!
Attachment #8366888 - Flags: review?(nthomas) → review+
Commit pushed to master at https://github.com/mozilla/balrog https://github.com/mozilla/balrog/commit/e96baa04e52a8b2302cc81ac4827d144d002f9d1 bug 885173: balrog should return empty snippets instead of 500s. r=nthomas
Comment on attachment 8366888 [details] [diff] [review] send exceptions to sentry then nomnomnom Pushed. Going to wait until there's a few patches in the queue to ask for deployment.
Attachment #8366888 - Flags: checked-in+
Deployed to prod.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.