rollbar / rollbar/rollbar-php

Rollbar:log() does not deliver content of \PDOException exceptions

Open
#491 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Rank: 3 - Minor Status: 1 - Discussion Type: Bug
Dominant language
PHP
Stars
337
Forks
116
Avg merge
17d 2h
Merged PRs (30d)
1

Description

In the following code

try{
  blah();
}
catch(Exception $e){
  Rollbar::log(Level::ERROR, “this is sent”);
  Rollbar::log(Level::ERROR, $e); /* this is not */
}

the first log is sent to Rollbar, but not the second. I can’t figure out what is wrong there. Removing the catch or throwing inside it does the same, the exception is not sent (intentionally raised by causing a syntax error).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Rollbar::log() entry point and reproduce the reported behavior with a PDOException inside the catch block. Trace how the exception is handled compared with the plain string, and consider the issue done when the exception content is delivered to Rollbar without breaking the existing string logging behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.