Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate Exception Messages if needed #646

Merged
merged 3 commits into from
Dec 21, 2020
Merged

Commits on Dec 21, 2020

  1. Truncate Exception Messages if needed.

    If an exception occurs, such as a `Mysql2::Error::ConnectionError`, where the query is extremely long, this can cause the payload to exceed what Bugsnag will accept and throw a `Errno::EPIPE: Broken pipe` error when trying to send the request to Bugsnag.
    
    A number of elements are already trimmed when the payload is too large, including meta data, stacktrace code, etc. However, the exception messages were not being trimmed.
    
    This commit adds exception message trimming to `Bugsnag::Helpers.trim_if_needed`, which should help reduce errors when the queries causing the errors are exceptionally long.
    
    It also adds a spec to `helper_spec.rb` that tests this functionality.
    joshuapinter authored and imjoehaines committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    4d6e8f4 View commit details
    Browse the repository at this point in the history
  2. Add changelog entry

    imjoehaines committed Dec 21, 2020
    Configuration menu
    Copy the full SHA
    64070e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0a21017 View commit details
    Browse the repository at this point in the history