Commit Graph

7 Commits

Author SHA1 Message Date
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 20:01:52 +00:00
Ethan Vizitei 6da94ff1d8 introduce error levels to exception handling
closes FOO-1120
refs FOO-1125
flag=none

introduce canvas-errors logging callback

move error logging from application_controller
to Canvas::Errors callback

let all canvas::errors callbacks handle the new options hash

don't send errors less than ":error" level to sentry or
error reports.

change error stats to be grouped by "level", and use
error name as a tag.

TEST PLAN:
  1) regular errors should still hit all the callbacks
  2) errors declared as ":warn" or ":info" levels should
     not make it to sentry (like SAML MissingMessage errors)
  3) local errors during development should still get logged out
     to development.log file

Change-Id: Ibe1401c0f5ad8f6d697c64f6a34153aaea048281
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251125
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2020-10-29 02:04:14 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Rob Orton ccc216ecfc allow ignoring error types from setting
test plan
 - existing errors should work
 - have a raven.yml
 - populate Settings.set('ignorable_errors', 'some error')
 - 

Change-Id: I1bbfc003506ef5f15aa7fdb887e0249c84f09c56
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232977
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2020-04-06 16:33:00 +00:00
Landon Wilkins e26843ff95 da licença part 34
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: Ic6b3be7861a2c91d76889c1740f964e401638e04
Reviewed-on: https://gerrit.instructure.com/110061
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 22:00:30 +00:00
Ethan Vizitei 21a728f05c setup a generalized way to leave out errors from sentry reporting
refs CNVS-20836

Once this is merged, plugins or extensions can
register their own exceptions if they don't
want them broadcast to sentry for whatever reason
(there are some job failures that are a good candidate
for this)

Change-Id: Ic3bceb8185a92479166ec55c8c6c66dacf259f5a
Reviewed-on: https://gerrit.instructure.com/55678
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-06-23 22:41:26 +00:00
Ethan Vizitei f0e9a353a3 stringify messages for sentry
closes CNVS-20552

This doesn't fix the underlying media object problem, but it's being
reported as an issue with the sentry interface because Raven doesn't
like symbols as messages and trys to call ".message" on them

TEST PLAN:
 1) error capturing should still work with sentry
 2) call Canvas::Errors.capture with a symbol (instead of a string),
   it should get sent to sentry correctly

Change-Id: I84cfe7894892692a8e2d8ea699cba86caf6c2b23
Reviewed-on: https://gerrit.instructure.com/54463
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-05-22 20:05:12 +00:00